Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Issue 1101783002: ui: Cache the output of View::OnPaint when the View isn't invalid. (Closed)

Created:
5 years, 8 months ago by danakj
Modified:
5 years, 8 months ago
Reviewers:
sky, piman
CC:
chromium-reviews, tdanderson+views_chromium.org, Ian Vollick, tfarina, sievers+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org, enne (OOO), piman, sadrul, sky
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://crrev.com/93f5730af51af283713ad19dd5e08c3b3ea34eaa Cr-Commit-Position: refs/heads/master@{#326976}

Patch Set 1 #

Patch Set 2 : cache: . #

Total comments: 11

Patch Set 3 : cache: reviewed #

Total comments: 4

Patch Set 4 : cache: . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -20 lines) Patch
M cc/resources/drawing_display_item.h View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/resources/drawing_display_item.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/compositor/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/compositor/compositor.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 1 chunk +4 lines, -5 lines 0 comments Download
A ui/compositor/paint_cache.h View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download
A ui/compositor/paint_cache.cc View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
M ui/compositor/paint_context.h View 1 2 3 2 chunks +12 lines, -4 lines 0 comments Download
M ui/compositor/paint_recorder.h View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M ui/compositor/paint_recorder.cc View 2 chunks +15 lines, -6 lines 0 comments Download
M ui/views/view.h View 2 chunks +4 lines, -0 lines 0 comments Download
M ui/views/view.cc View 1 2 3 3 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
danakj
Depends on: https://codereview.chromium.org/1080633009/
5 years, 8 months ago (2015-04-22 23:31:54 UTC) #1
sky
I think this should be behind a flag until it's ready. https://codereview.chromium.org/1101783002/diff/40001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): ...
5 years, 8 months ago (2015-04-23 16:29:00 UTC) #3
danakj
https://codereview.chromium.org/1101783002/diff/40001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/1101783002/diff/40001/ui/compositor/layer.cc#newcode754 ui/compositor/layer.cc:754: gfx::IntersectRects(damaged_region_.bounds(), bounds()); On 2015/04/23 16:29:00, sky wrote: > Isn't ...
5 years, 8 months ago (2015-04-23 16:34:09 UTC) #4
danakj
On Thu, Apr 23, 2015 at 9:29 AM, <sky@chromium.org> wrote: > I think this should ...
5 years, 8 months ago (2015-04-23 16:38:53 UTC) #5
danakj
PTAL
5 years, 8 months ago (2015-04-23 16:40:28 UTC) #6
sky
As long as all of this is behind a flag, LGTM https://codereview.chromium.org/1101783002/diff/60001/ui/compositor/paint_cache.h File ui/compositor/paint_cache.h (right): ...
5 years, 8 months ago (2015-04-23 16:43:31 UTC) #7
danakj
https://codereview.chromium.org/1101783002/diff/60001/ui/compositor/paint_cache.h File ui/compositor/paint_cache.h (right): https://codereview.chromium.org/1101783002/diff/60001/ui/compositor/paint_cache.h#newcode26 ui/compositor/paint_cache.h:26: bool UseCache(const PaintContext& context); On 2015/04/23 16:43:31, sky wrote: ...
5 years, 8 months ago (2015-04-23 16:46:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1101783002/80001
5 years, 8 months ago (2015-04-23 16:50:12 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:80001)
5 years, 8 months ago (2015-04-23 18:41:23 UTC) #12
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/7f686cdcff81d6779b962e98e529a7360be2809c Cr-Commit-Position: refs/heads/master@{#326592}
5 years, 8 months ago (2015-04-23 18:42:25 UTC) #13
Justin Donnelly
A revert of this CL (patchset #4 id:80001) has been created in https://codereview.chromium.org/1108463002/ by jdonnelly@chromium.org. ...
5 years, 8 months ago (2015-04-23 20:50:55 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1101783002/80001
5 years, 8 months ago (2015-04-25 15:53:40 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:80001)
5 years, 8 months ago (2015-04-25 17:53:27 UTC) #17
commit-bot: I haz the power
5 years, 8 months ago (2015-04-25 17:54:09 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/93f5730af51af283713ad19dd5e08c3b3ea34eaa
Cr-Commit-Position: refs/heads/master@{#326976}

Powered by Google App Engine
This is Rietveld 408576698