harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r640918 - in /harmony/enhanced/classlib/trunk/modules/awt/src/main: java/common/java/awt/ java/common/org/apache/harmony/awt/gl/ java/unix/org/apache/harmony/awt/gl/linux/ native/gl/unix/ native/gl/unix/include/
Date Tue, 25 Mar 2008 18:04:11 GMT
Author: ayza
Date: Tue Mar 25 11:04:06 2008
New Revision: 640918

URL: http://svn.apache.org/viewvc?rev=640918&view=rev
Log:
Applying patch from HARMONY-5540 ([classlib][awt] Component paint method sometimes misses
part of painted elements)

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XBlitter.cpp
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/exports.txt
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java?rev=640918&r1=640917&r2=640918&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
Tue Mar 25 11:04:06 2008
@@ -79,6 +79,7 @@
 
 import org.apache.harmony.awt.ClipRegion;
 import org.apache.harmony.awt.FieldsAccessor;
+import org.apache.harmony.awt.gl.CommonGraphics2D;
 import org.apache.harmony.awt.gl.MultiRectArea;
 import org.apache.harmony.awt.internal.nls.Messages;
 import org.apache.harmony.awt.state.State;
@@ -3714,6 +3715,7 @@
         } else {
             update(g);
         }
+        ((CommonGraphics2D)g).flush();
         g.dispose();
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java?rev=640918&r1=640917&r2=640918&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
Tue Mar 25 11:04:06 2008
@@ -1099,4 +1099,6 @@
         //copy.origTransform = new AffineTransform(origTransform);
         copy.origPoint = new Point(origPoint);
     }
+
+    public void flush(){}
 }

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java?rev=640918&r1=640917&r2=640918&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
Tue Mar 25 11:04:06 2008
@@ -950,6 +950,11 @@
 
     }
 
+    @Override
+    public void flush(){
+        flush(display);
+    }
+
     // Native methods
 
     // GC methods
@@ -985,5 +990,9 @@
     private native int fillArc(long display, long drawable, long gc, int x, int y, int width,
int height, int startAngle, int angle);
 
     private native int copyArea(long display, long src, long dst, long gc, int src_x, int
src_y, int width, int height, int dst_x, int dst_y);
+
+    // Send all queued requests to the server
+
+    private native void flush(long display);
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XBlitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XBlitter.cpp?rev=640918&r1=640917&r2=640918&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XBlitter.cpp (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XBlitter.cpp Tue Mar
25 11:04:06 2008
@@ -361,8 +361,6 @@
         XRenderComposite(display, op, srcPict, alphaMask, dstPict, 
             srcX, srcY, 0, 0, dstX, dstY, width, height);
 
-        XFlush(display);
-
         if(alphaMask) XRenderFreePicture(display, alphaMask);
         XRenderFreePicture(display, srcPict);
         XRenderFreePicture(display, dstPict);
@@ -447,7 +445,6 @@
 
         XSetClipRectangles(display, dstSurf->gc, 0, 0, rects, num_rects, Unsorted);
         XCopyArea(display, srcSurf->drawable, dstSurf->drawable, dstSurf->gc, srcX,
srcY, width, height, dstX, dstY);
-        XFlush(display);
 
         if(rects) free(rects);
         return;
@@ -568,8 +565,6 @@
 
         XRenderComposite(display, op, srcPict, alphaMask, dstPict, 
             srcX, srcY, 0, 0, dstX, dstY, width, height);
-
-        XFlush(display);
 
         if(alphaMask) XRenderFreePicture(display, alphaMask);
         XRenderFreePicture(display, srcPict);

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp?rev=640918&r1=640917&r2=640918&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp Tue
Mar 25 11:04:06 2008
@@ -244,4 +244,10 @@
     return ret;
 }
 
+JNIEXPORT jint JNICALL 
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_flush
+(JNIEnv *env, jobject obj, jlong display)
+{
+    XFlush((Display *)display);
+}
 

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/exports.txt?rev=640918&r1=640917&r2=640918&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/exports.txt (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/exports.txt Tue Mar
25 11:04:06 2008
@@ -32,6 +32,7 @@
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setForeground
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setFunction
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setStroke
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_flush
 Java_org_apache_harmony_awt_gl_linux_XSurface_createSurfData
 Java_org_apache_harmony_awt_gl_linux_XSurface_dispose
 Java_org_apache_harmony_awt_gl_linux_PixmapSurface_createSurfData

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h?rev=640918&r1=640917&r2=640918&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h
Tue Mar 25 11:04:06 2008
@@ -158,6 +158,12 @@
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setStroke(JNIEnv *, jobject, 
     jlong, jlong, jint, jint, jint, jint, jbyteArray, jint);
 
+/*
+ * Method: org.apache.harmony.awt.gl.linux.XGraphics2D.flush(J)V
+ */
+JNIEXPORT jint JNICALL 
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_flush(JNIEnv *, jobject, jlong);
+
 #ifdef __cplusplus
 }
 #endif



Mime
View raw message