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

Issue 1021823002: Introduce ui::PaintRecorder and use it for CursorWindowDelegate. (Closed)

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

Description

Introduce ui::PaintRecorder and use it for CursorWindowDelegate. This makes the mouse cursor appear in slimming-ui impl-side painting. In the CursorWindowDelegate, we don't have invalidation, so we don't expect to be asked to repaint the layer after the first time. For that reason we don't cache the SkPicture in the delegate. This makes use of the TakeDisplayItem() helper method. Conversely in View we intend to cache the SkPicture, so it pulls the SkPicture itself out of the recorder, with a TODO to cache it in upcoming changes, and inserts the SkPicture into the DisplayItemList itself. R=enne, piman@chromium.org, sadrul, sky BUG=466426

Patch Set 1 #

Total comments: 3

Patch Set 2 : slimmingui-paintrecorder: . #

Total comments: 2

Patch Set 3 : slimmingui-paintrecorder: rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -22 lines) Patch
M ash/display/cursor_window_controller.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M cc/resources/drawing_display_item.h View 1 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/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/compositor.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
A ui/compositor/paint_recorder.h View 1 1 chunk +64 lines, -0 lines 0 comments Download
A ui/compositor/paint_recorder.cc View 1 1 chunk +43 lines, -0 lines 0 comments Download
M ui/views/view.cc View 1 2 3 chunks +12 lines, -19 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
danakj
5 years, 9 months ago (2015-03-19 20:50:32 UTC) #1
danakj
This should be a smaller CL to give some context on API decisions around what ...
5 years, 9 months ago (2015-03-19 20:51:59 UTC) #2
piman
lgtm https://codereview.chromium.org/1021823002/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/1021823002/diff/1/ui/views/view.cc#newcode1484 ui/views/view.cc:1484: // TODO(danakj): Cache this picture in the View ...
5 years, 9 months ago (2015-03-19 20:59:19 UTC) #3
danakj
https://codereview.chromium.org/1021823002/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/1021823002/diff/1/ui/views/view.cc#newcode1484 ui/views/view.cc:1484: // TODO(danakj): Cache this picture in the View and ...
5 years, 9 months ago (2015-03-19 21:06:32 UTC) #4
danakj
+ajuma for cc/ change. https://codereview.chromium.org/1021823002/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/1021823002/diff/1/ui/views/view.cc#newcode1484 ui/views/view.cc:1484: // TODO(danakj): Cache this picture ...
5 years, 9 months ago (2015-03-19 21:13:46 UTC) #6
ajuma
On 2015/03/19 21:13:46, danakj wrote: > +ajuma for cc/ change. lgtm
5 years, 9 months ago (2015-03-19 21:23:40 UTC) #7
danakj
5 years, 9 months ago (2015-03-19 22:05:16 UTC) #9
oshima
ash lgtm
5 years, 9 months ago (2015-03-19 22:19:28 UTC) #10
sadrul
Is this on top of the other CL?
5 years, 9 months ago (2015-03-19 22:51:47 UTC) #11
danakj
On 2015/03/19 22:51:47, sadrul wrote: > Is this on top of the other CL? Yep
5 years, 9 months ago (2015-03-19 22:52:15 UTC) #12
sky
This one is harder to see through though as it doesn't look like you're adding ...
5 years, 9 months ago (2015-03-20 00:05:16 UTC) #13
danakj
Sorry I can't add the function in just one place and still compile it (pure ...
5 years, 9 months ago (2015-03-20 01:10:40 UTC) #14
sky
https://codereview.chromium.org/1021823002/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/1021823002/diff/20001/ui/views/view.cc#newcode1467 ui/views/view.cc:1467: void View::OnPaintLayerToDisplayList(cc::DisplayItemList* list, I was commenting on this function. ...
5 years, 9 months ago (2015-03-20 14:52:45 UTC) #15
danakj
5 years, 9 months ago (2015-03-20 15:26:36 UTC) #16
https://codereview.chromium.org/1021823002/diff/20001/ui/views/view.cc
File ui/views/view.cc (right):

https://codereview.chromium.org/1021823002/diff/20001/ui/views/view.cc#newcod...
ui/views/view.cc:1467: void View::OnPaintLayerToDisplayList(cc::DisplayItemList*
list,
On 2015/03/20 14:52:45, sky wrote:
> I was commenting on this function. This hasn't landed in master yet, which is
> why I find this patch a bit confusing.

Ya this patch depends on the first one to add the functions. I changed this
function here just to demonstrate that both views (caching) and other (non
caching) can both share code by using the paint recorder. 

This shouldn't make the views implementation here any more complete yet.

Powered by Google App Engine
This is Rietveld 408576698