Bug 93012 - [BlackBerry] Rounding error of destination rect of checkerboard
Summary: [BlackBerry] Rounding error of destination rect of checkerboard
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 11:44 PDT by Leo Yang
Modified: 2012-08-02 12:54 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2012-08-02 12:07 PDT, Leo Yang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Yang 2012-08-02 11:44:11 PDT
1302 void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
1303                                        const Platform::IntRect& srcRect,
1304                                        bool force)
1305 {
...
1407             // Blit checkered to those parts that are not covered by the backingStoreRect.
1408             IntRectList checkeredRects = checkeredRegion.rects();
1409             for (size_t i = 0; i < checkeredRects.size(); ++i) {
1410                 Platform::IntRect dstRect = transformation.mapRect(Platform::IntRect(
1411                     Platform::IntPoint(checkeredRects.at(i).x() - origin.x(), checkeredRects.at(i).y() - origin.y()),
1412                                        checkeredRects.at(i).size()));
1413 #if DEBUG_CHECKERBOARD
1414                 blitCheckered = true;
1415 #endif
1416                 fillWindow(BlackBerry::Platform::Graphics::CheckerboardPattern,
1417                     dstRect, checkeredRects.at(i).location(), transformation.a());
1418             }
1419         }
...
}

The dstRect in line 1401 might get rounding error +1/-1 pixel due to transformation. We need to intersect it with the original dstRect passed into this function.

Patch is coming soon.
Comment 1 Leo Yang 2012-08-02 12:07:28 PDT
Created attachment 156134 [details]
Patch
Comment 2 Rob Buis 2012-08-02 12:19:39 PDT
Comment on attachment 156134 [details]
Patch

LGTM.
Comment 3 WebKit Review Bot 2012-08-02 12:54:08 PDT
Comment on attachment 156134 [details]
Patch

Clearing flags on attachment: 156134

Committed r124487: <http://trac.webkit.org/changeset/124487>
Comment 4 WebKit Review Bot 2012-08-02 12:54:12 PDT
All reviewed patches have been landed.  Closing bug.