Title: [124487] trunk/Source/WebKit/blackberry
Revision
124487
Author
[email protected]
Date
2012-08-02 12:53:52 -0700 (Thu, 02 Aug 2012)

Log Message

[BlackBerry] Rounding error of destination rect of checkerboard
https://bugs.webkit.org/show_bug.cgi?id=93012

Patch by Leo Yang <[email protected]> on 2012-08-02
Reviewed by Rob Buis.

Reviewed internally by Jakob Petsovits.

Intersect with the destination rectangle to eliminate the rounding error.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::blitContents):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore.cpp (124486 => 124487)


--- trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-08-02 19:42:01 UTC (rev 124486)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-08-02 19:53:52 UTC (rev 124487)
@@ -1407,14 +1407,17 @@
             // Blit checkered to those parts that are not covered by the backingStoreRect.
             IntRectList checkeredRects = checkeredRegion.rects();
             for (size_t i = 0; i < checkeredRects.size(); ++i) {
-                Platform::IntRect dstRect = transformation.mapRect(Platform::IntRect(
+                Platform::IntRect clippedDstRect = transformation.mapRect(Platform::IntRect(
                     Platform::IntPoint(checkeredRects.at(i).x() - origin.x(), checkeredRects.at(i).y() - origin.y()),
                                        checkeredRects.at(i).size()));
+                // To eliminate 1 pixel inflation due to transformation rounding.
+                clippedDstRect.intersect(dstRect);
 #if DEBUG_CHECKERBOARD
                 blitCheckered = true;
 #endif
+
                 fillWindow(BlackBerry::Platform::Graphics::CheckerboardPattern,
-                    dstRect, checkeredRects.at(i).location(), transformation.a());
+                    clippedDstRect, checkeredRects.at(i).location(), transformation.a());
             }
         }
 

Modified: trunk/Source/WebKit/blackberry/ChangeLog (124486 => 124487)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-08-02 19:42:01 UTC (rev 124486)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-08-02 19:53:52 UTC (rev 124487)
@@ -1,3 +1,17 @@
+2012-08-02  Leo Yang  <[email protected]>
+
+        [BlackBerry] Rounding error of destination rect of checkerboard
+        https://bugs.webkit.org/show_bug.cgi?id=93012
+
+        Reviewed by Rob Buis.
+
+        Reviewed internally by Jakob Petsovits.
+
+        Intersect with the destination rectangle to eliminate the rounding error.
+
+        * Api/BackingStore.cpp:
+        (BlackBerry::WebKit::BackingStorePrivate::blitContents):
+
 2012-08-01  Antonio Gomes  <[email protected]>
 
         [BlackBerry] Implement InRegionScroller class as a in-region scroll controller
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to