[Patch] gnu.java.awt.peer.gtk merged

Michael Koch konqueror@gmx.de
Wed Apr 20 06:10:00 GMT 2005


Hi list,


I just commited the attached patch to merge a fix for offscreen images
from GNU classpath to HEAD.


Michael


2005-04-20  Sven de Marothy  <sven@physto.se>

	* gnu/java/awt/peer/gtk/GdkGraphics.java:
	(drawImage): Don't notify the image observer for offscreen images.
	* gnu/java/awt/peer/gtk/GtkImagePainter.java:
	(setPixels): Don't notify the image observer.

-------------- next part --------------
Index: gnu/java/awt/peer/gtk/GdkGraphics.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/awt/peer/gtk/GdkGraphics.java,v
retrieving revision 1.11
diff -u -r1.11 GdkGraphics.java
--- gnu/java/awt/peer/gtk/GdkGraphics.java	19 Apr 2005 05:20:11 -0000	1.11
+++ gnu/java/awt/peer/gtk/GdkGraphics.java	20 Apr 2005 06:08:59 -0000
@@ -147,11 +147,6 @@
         int height = img.getHeight (null);
 	copyPixmap (img.getGraphics (), 
 		    x, y, width, height);
-        // FIXME: need to differentiate between SOMEBITS and FRAMEBITS.
-        if (observer != null)
-          observer.imageUpdate (img,
-                                ImageObserver.FRAMEBITS,
-                                x, y, width, height);
 	return true;
       }
 
@@ -171,12 +166,6 @@
         int height = img.getHeight (null);
 	copyPixmap (img.getGraphics (), 
 		    x, y, width, height);
-
-        // FIXME: need to differentiate between SOMEBITS and FRAMEBITS.
-        if (observer != null)
-          observer.imageUpdate (img,
-                                ImageObserver.FRAMEBITS,
-                                x, y, width, height);
 	return true;
       }
 
@@ -197,11 +186,6 @@
         copyAndScalePixmap (img.getGraphics (), false, false,
                             0, 0, img.getWidth (null), img.getHeight (null), 
                             x, y, width, height);
-        // FIXME: need to differentiate between SOMEBITS and FRAMEBITS.
-        if (observer != null)
-          observer.imageUpdate (img,
-                                ImageObserver.FRAMEBITS,
-                                x, y, width, height);
         return true;
       }
 
@@ -286,12 +270,6 @@
         copyAndScalePixmap (img.getGraphics (), x_flip, y_flip,
                             sx_start, sy_start, s_width, s_height, 
                             dx_start, dy_start, d_width, d_height);
-
-        // FIXME: need to differentiate between SOMEBITS and FRAMEBITS.
-        if (observer != null)
-          observer.imageUpdate (img,
-                                ImageObserver.FRAMEBITS,
-                                dx_start, dy_start, d_width, d_height);
         return true;
       }
 
Index: gnu/java/awt/peer/gtk/GtkImagePainter.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/awt/peer/gtk/GtkImagePainter.java,v
retrieving revision 1.6
diff -u -r1.6 GtkImagePainter.java
--- gnu/java/awt/peer/gtk/GtkImagePainter.java	30 Nov 2004 23:58:35 -0000	1.6
+++ gnu/java/awt/peer/gtk/GtkImagePainter.java	20 Apr 2005 06:08:59 -0000
@@ -184,11 +184,6 @@
 	        startX + x, startY + y,
 		width, height, convertPixels (pixels, model), offset,
 		scansize, affine);
-
-    if (observer != null)
-      observer.imageUpdate (image,
-			    ImageObserver.SOMEBITS,
-			    x, y, width, height);
   }
 
   public void 


More information about the Java-patches mailing list