Bug 59112 - [chromium] Don't upload partially drawn tiles in the compositor
Summary: [chromium] Don't upload partially drawn tiles in the compositor
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adrienne Walker
Depends on:
Reported: 2011-04-21 10:22 PDT by Adrienne Walker
Modified: 2011-04-21 13:19 PDT (History)
4 users (show)

See Also:

Patch (5.43 KB, patch)
2011-04-21 10:53 PDT, Adrienne Walker
jamesr: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrienne Walker 2011-04-21 10:22:35 PDT
[chromium] Don't upload partially drawn tiles in the compositor
Comment 1 Adrienne Walker 2011-04-21 10:53:45 PDT
Created attachment 90557 [details]
Comment 2 Adrienne Walker 2011-04-21 11:11:41 PDT
This corresponds to http://crbug.com/79960.

What was happening is this convoluted chain of events:

Content layer passes some update rect to update.
Update function finds all the tiles that intersect that rect.
Paint rect is calculated from the union of the dirty rects of those tiles.
Upload function finds all the tiles that intersects with that paint rect.
Because of tile border texels, the set of tiles intersecting the paint rect is larger than that of the set of tiles intersecting the update rect.
One of these tiles that was not in the update rect but in the paint rect only partially intersects the paint rect.
Part of the tile is uploaded even though more of it is dirty.
The tile's dirty rect is cleared even though only part of the tile has been uploaded.
The tile has been partially modified, so it looks wrong.

The real problem is that we're trying to upload data for tiles that we didn't intend to update.  If we had intended to upload data for them, we would have painted their entire dirty rect.  So the simplest fix is to iterate over the same set of tiles in both update and upload.
Comment 3 James Robinson 2011-04-21 11:39:38 PDT
Comment on attachment 90557 [details]

Comment 4 Adrienne Walker 2011-04-21 13:19:48 PDT
Committed r84542: <http://trac.webkit.org/changeset/84542>