Bug 152055 - [TexMap] pixel coverage multiplication in TiledBackingStore can overflow
Summary: [TexMap] pixel coverage multiplication in TiledBackingStore can overflow
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-09 03:54 PST by Zan Dobersek
Modified: 2015-12-10 02:25 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.52 KB, patch)
2015-12-09 03:58 PST, Zan Dobersek
no flags Details | Formatted Diff | Diff
Example of the problem (56.76 KB, image/png)
2015-12-09 04:28 PST, Zan Dobersek
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2015-12-09 03:54:04 PST
[TexMap] pixel coverage multiplication in TiledBackingStore can overflow
Comment 1 Zan Dobersek 2015-12-09 03:58:55 PST
Created attachment 266987 [details]
Patch
Comment 2 Zan Dobersek 2015-12-09 04:28:22 PST
Created attachment 266991 [details]
Example of the problem

This shows the issue on the poster-circle demo, with tiles missing from different rings because the pixel coverage area overflowed.

The problem isn't fixed until the next layer flush, and only if the tiles are not in such a position that would again result in overflowing the candidate area multiplication.
Comment 3 Zan Dobersek 2015-12-09 06:02:26 PST
(In reply to comment #2)
> The problem isn't fixed until the next layer flush, and only if the tiles
> are not in such a position that would again result in overflowing the
> candidate area multiplication.

It should be noted that on WebKitGTK+ there's at the moment an abundance of layer flushes (essentially for every frame when running animations), so the tiles are created soon after the animation starts and the layers move into a position that covers less area.

The image of the problem is from the Wayland port which uses Coordinated Graphics for layer flushing (which is additionally optimized to be kept to a minimum).
Comment 4 Zan Dobersek 2015-12-09 06:04:34 PST
I also understand a test would be desired, but the only way to test for this would be to run the compositing tests and enable pixel results, neither of which is done for the GTK+ port.
Comment 5 Alex Christensen 2015-12-09 23:56:43 PST
Comment on attachment 266987 [details]
Patch

WTF::safeMultiply doesn't seem to be used anywhere.  Checked<...> does.
Comment 6 Zan Dobersek 2015-12-10 02:25:17 PST
Comment on attachment 266987 [details]
Patch

Clearing flags on attachment: 266987

Committed r193898: <http://trac.webkit.org/changeset/193898>
Comment 7 Zan Dobersek 2015-12-10 02:25:25 PST
All reviewed patches have been landed.  Closing bug.