Skip to content

Commit 84f0345

Browse files
arunjose696akurtakov
authored andcommitted
Removing Image#CreateSurface from GTK
Removing CreateSurface method from image class and its callers as this method currently does not do anything.
1 parent 43d06c5 commit 84f0345

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public Pattern(Device device, Image image) {
8585
super(device);
8686
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
8787
if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
88-
image.createSurface();
8988
handle = Cairo.cairo_pattern_create_for_surface(image.surface);
9089
if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
9190
Cairo.cairo_pattern_set_extend(handle, Cairo.CAIRO_EXTEND_REPEAT);

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,6 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
940940
}
941941
long cairo = data.cairo;
942942
if (data.alpha != 0) {
943-
srcImage.createSurface();
944943
Cairo.cairo_save(cairo);
945944
if ((data.style & SWT.MIRRORED) != 0) {
946945
Cairo.cairo_scale(cairo, -1f, 1);

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,10 +909,6 @@ void createMask() {
909909
C.memmove(surfaceData, srcData, srcData.length);
910910
}
911911

912-
void createSurface() {
913-
if (surface != 0) return;
914-
}
915-
916912
/**
917913
* Destroy the receiver's mask if it exists.
918914
*/

0 commit comments

Comments
 (0)