harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r471392 - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java: linux/org/apache/harmony/awt/gl/linux/XBlitter.java windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java
Date Sun, 05 Nov 2006 10:31:30 GMT
Author: apetrenko
Date: Sun Nov  5 02:31:30 2006
New Revision: 471392

URL: http://svn.apache.org/viewvc?view=rev&rev=471392
Log:
Patch for HARMONY-1652 "[classlib][awt] Graphics doesn't draw image if clip is set to null"

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/linux/org/apache/harmony/awt/gl/linux/XBlitter.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/linux/org/apache/harmony/awt/gl/linux/XBlitter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/linux/org/apache/harmony/awt/gl/linux/XBlitter.java?view=diff&rev=471392&r1=471391&r2=471392
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/linux/org/apache/harmony/awt/gl/linux/XBlitter.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/linux/org/apache/harmony/awt/gl/linux/XBlitter.java
Sun Nov  5 02:31:30 2006
@@ -248,7 +248,11 @@
             int width, int height,
             Composite comp, Color bgcolor, MultiRectArea clip
     ) {
-        clip = new MultiRectArea(clip);
+        if (clip == null) {
+            clip = new MultiRectArea(new Rectangle(dstX, dstY, width, height));
+        } else {
+            clip = new MultiRectArea(clip);
+        }
         // XXX - todo - need to do smth with bgcolor
         ColorModel srcCM = srcSurf.getColorModel();
         XSurface xDstSurf = (XSurface) dstSurf;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java?view=diff&rev=471392&r1=471391&r2=471392
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java
Sun Nov  5 02:31:30 2006
@@ -89,17 +89,11 @@
             }
             long dstSurfStruct = dstSurf.getSurfaceDataPtr();
             long srcSurfStruct = srcSurf.getSurfaceDataPtr();
-            int clipRects[];
+            int clipRects[] = null;
+            int numVertex = 0;
             if(clip != null){
                 clipRects = clip.rect;
-            }else{
-                clipRects = new int[]{5, 0, 0, dstSurf.getWidth(),
-                        dstSurf.getHeight()};
-            }
-
-            int numVertex = clipRects[0] - 1;
-            if(numVertex == 0) {
-                return;
+                numVertex = clipRects[0] - 1;
             }
 
             if(comp instanceof AlphaComposite){



Mime
View raw message