Descriptionui: Eliminate allocating gfx::Canvas on the heap for every view.
PaintRecorder needs to present a gfx::Canvas instead of an SkCanvas.
Currently it does so via CreateCanvasWithoutScaling which returns
a new Canvas allocated on the heap. But mallocs are terrible, so
instead make it a constructor and have the canvas allocated as part
of ui::PaintRecorder on the stack.
This changes the time to record a single tab loading spinner from
0.138818 ms to 0.124487 ms per frame for a 10% reduction in time.
R=sky
BUG=466426
Committed: https://crrev.com/8fa739b657b48f54ee96e2187158570101623f94
Cr-Commit-Position: refs/heads/master@{#329315}
Patch Set 1 #
Total comments: 1
Patch Set 2 : canvasstack: fixcompile #
Total comments: 5
Patch Set 3 : canvasstack: spaces #Patch Set 4 : canvasstack: comment #Patch Set 5 : canvasstack: addTODO #
Messages
Total messages: 17 (5 generated)
|