Skip to content

Commit 42a6916

Browse files
committed
Revert change of Image surface color type from 24 to 32 bit
In a previous change (5c2611d), the case distinction in creation of an image's surface depending on using GTK 4 or not has been removed. By accident, this change replaced the previously used 24 bit color format (for both cases) with a 32 bit color format. This change revert that accidental modification.
1 parent da081e9 commit 42a6916

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ void init(int width, int height) {
12601260
this.type = SWT.BITMAP;
12611261

12621262
/* Create the pixmap */
1263-
surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height);
1263+
surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_RGB24, width, height);
12641264
if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
12651265
// When we create a blank image we need to set it to 100 in GTK3 as we draw using 100% scale.
12661266
// Cairo will take care of scaling for us when image needs to be scaled.

0 commit comments

Comments
 (0)