ui: Cache the output of View::OnPaint when the View isn't invalid.
Store the output of View::OnPaint as a PaintCache object, and when the
view has not been invalidated, use that cache output instead of doing
work to build a recording.
Performance data as follows when the loading spinner is going:
Before impl-side (TOT): 0.13ms / paint
With impl-side (no slimming paint): 0.22ms / paint
With impl-side and slimming paint (this patch): 0.17ms / paint
So this gets us some of the way there. I need to investigate why it's
not doing more.
R=piman@chromium.org, sky
BUG=466426
Committed: https://crrev.com/
7f686cdcff81d6779b962e98e529a7360be2809c
Cr-Commit-Position: refs/heads/master@{#326592}
Review URL: https://codereview.chromium.org/
1101783002
Cr-Commit-Position: refs/heads/master@{#326976}