[webkit-reviews] review requested: [Bug 82117] [chromium] Layers with animating transforms should prepaint even if they are not visible yet : [Attachment 133671] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 24 21:09:42 PDT 2012


Dana Jansens <danakj at chromium.org> has asked  for review:
Bug 82117: [chromium] Layers with animating transforms should prepaint even if
they are not visible yet
https://bugs.webkit.org/show_bug.cgi?id=82117

Attachment 133671: Patch
https://bugs.webkit.org/attachment.cgi?id=133671&action=review

------- Additional Comments from Dana Jansens <danakj at chromium.org>
The needsIdlePaint() and prepareToUpdateIdle() must match in their expectations
of what we would prepaint if we had infinite memory, to prevent from committing
indefinitely trying to prepaint more (needsIdlePaint() says there is more to
do!) while prepareToUpdateIdle() thinks it is done. So it is important that
idlePaintRect() give them both the same answer, and that they early out under
the same conditions.

I discussed that protect of the whole prepaintRect with @epenner, and
understand its purpose now. Layers toward the front would steal tiles from
layers behind them over time until all layers finished prepainting anyways
(each time through they would reserve more, and possibly evict tiles from
below). And the benefit is that if a tile was already painted, but we didn't
get to it yet in the prepaint order, we don't end up causing it to get evicted
by some layer below, whose tile will get evicted by us again in the future
anyways!

Great catch on the layers with no tiles (empty bounds()) point. Fixed the early
outs to leave in this case, and have unit tests for empty bounded layers with
or without animations.

So attached is new proposal for prepainting animating layers that won't trash
low memory environments (android).
1. We limit prepainting non-visible animating layers to layers that are at most
9 tiles.
2. For such layers, we prepaint the outer set of tiles on the layer (the outer
set here is pretty much all the tiles for the layer sizes concerned).


More information about the webkit-reviews mailing list