RESOLVED FIXED 118493
Deferring layer flushes can cause painting without layout being done
https://bugs.webkit.org/show_bug.cgi?id=118493
Summary Deferring layer flushes can cause painting without layout being done
Tim Horton
Reported 2013-07-08 19:25:17 PDT
1. We depend on a run loop observer that fires just before CA does painting to ensure that layout is up-to-date. 2. TileController manually calls setNeedsDisplay on CALayers. 3. RenderLayerCompositor can (after r147797) defer #1 and cause it to not happen in the same run loop cycle as #2. 4. This means that we can end up painting without layout being up-to-date, which can cause horrible, horrible graphical issues. We need to not defer (#3) if TileController has setNeedsDisplay'd any layers manually (or if we've added any new dirty layers). <rdar://problem/14286329>
Attachments
preliminary patch (5.45 KB, patch)
2013-07-10 04:03 PDT, Tim Horton
no flags
patch (7.88 KB, patch)
2013-07-10 13:01 PDT, Tim Horton
simon.fraser: review+
Tim Horton
Comment 1 2013-07-08 19:27:11 PDT
One of the best repro cases of actual real world badness caused by this is http://www.mercurynews.com, which frequently shows garbage (or black) upon loading.
Tim Horton
Comment 2 2013-07-10 03:53:47 PDT
#2 is actually "TileController can parent layers which had setNeedsDisplay called on them long ago, but were unparented"
Tim Horton
Comment 3 2013-07-10 04:03:27 PDT
Created attachment 206378 [details] preliminary patch
Tim Horton
Comment 4 2013-07-10 13:01:40 PDT
Antti Koivisto
Comment 5 2013-07-10 13:36:02 PDT
Comment on attachment 206409 [details] patch For the benefit of future debuggers, it might be good to add a comment above platformCALayerDidCreateTiles call as it is not that obvious that it initiates an immediate layer flush.
Tim Horton
Comment 6 2013-07-10 13:38:52 PDT
(In reply to comment #5) > (From update of attachment 206409 [details]) > For the benefit of future debuggers, it might be good to add a comment above platformCALayerDidCreateTiles call as it is not that obvious that it initiates an immediate layer flush. True. I'll do that.
Tim Horton
Comment 7 2013-07-10 14:19:02 PDT
Note You need to log in before you can comment on or make changes to this bug.