harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r574969 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/RepaintManager.java
Date Wed, 12 Sep 2007 14:23:02 GMT
Author: apetrenko
Date: Wed Sep 12 07:23:01 2007
New Revision: 574969

URL: http://svn.apache.org/viewvc?rev=574969&view=rev
Log:
Patch for HARMONY-4777 "[classlib][swing] Performance improvement for javax.swing.RepaintManager"

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/RepaintManager.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/RepaintManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/RepaintManager.java?rev=574969&r1=574968&r2=574969&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/RepaintManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/RepaintManager.java
Wed Sep 12 07:23:01 2007
@@ -188,6 +188,9 @@
         }
     }
 
+    // According to Spec as a offscreen buffer we can use offscreen image of any type,
+    // which can keep own content. Our implementation of VolatileImage based on GDI Bitmap
and
+    // can't lost content. For performance reason as a offscreen buffer we use VolatileImage.
     public Image getOffscreenBuffer(final Component c, final int proposedWidth, final int
proposedHeight) {
         int adjustedWidth = Math.min(proposedWidth, maximumSize.width);
         int adjustedHeight = Math.min(proposedHeight, maximumSize.height);
@@ -202,7 +205,7 @@
                 offscreenImage.flush();
             }
 
-            offscreenImage = c.createImage(adjustedWidth, adjustedHeight);
+            offscreenImage = c.createVolatileImage(adjustedWidth, adjustedHeight);
         }
 
         return offscreenImage;



Mime
View raw message