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

Issue 1396783003: Factor PaintArtifact out of DisplayItemList. (Closed)

Created:
5 years, 2 months ago by jbroman
Modified:
5 years, 2 months ago
Reviewers:
pdr., chrishtr, wkorman
CC:
blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jbroman, Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@const-replay
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Factor PaintArtifact out of DisplayItemList. This separates the concerns of an object which contains the paint data (the artifact) from the object which manages the caches and state through repeated painting. In particular, operations which "read" the result of paint should only need access to a |const PaintArtifact&|. BUG=537409 Committed: https://crrev.com/5243078103e8ab4753cfbf3b46058598c76931f0 Cr-Commit-Position: refs/heads/master@{#353224}

Patch Set 1 #

Patch Set 2 : replay is const now #

Patch Set 3 : restore accidentally removed line #

Patch Set 4 : #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -108 lines) Patch
M third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h View 5 chunks +14 lines, -52 lines 8 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp View 1 2 15 chunks +23 lines, -48 lines 1 comment Download
A third_party/WebKit/Source/platform/graphics/paint/DisplayItems.h View 1 chunk +52 lines, -0 lines 3 comments Download
A third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.h View 1 2 3 1 chunk +64 lines, -0 lines 3 comments Download
A third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp View 1 1 chunk +56 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/README.md View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/PageOverlayTest.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 14 (4 generated)
jbroman
Now that the paint artifact will contain two kinds of data forming a logically separate ...
5 years, 2 months ago (2015-10-08 21:06:51 UTC) #2
chrishtr
lgtm
5 years, 2 months ago (2015-10-09 03:48:44 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396783003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396783003/60001
5 years, 2 months ago (2015-10-09 03:49:15 UTC) #5
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 2 months ago (2015-10-09 03:53:47 UTC) #6
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/5243078103e8ab4753cfbf3b46058598c76931f0 Cr-Commit-Position: refs/heads/master@{#353224}
5 years, 2 months ago (2015-10-09 03:54:41 UTC) #7
pdr.
Very nice! Slightly different than our approach in https://codereview.chromium.org/1390933003 and for the better. My comments ...
5 years, 2 months ago (2015-10-09 03:57:51 UTC) #9
wkorman
https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Source/platform/graphics/paint/DisplayItems.h File third_party/WebKit/Source/platform/graphics/paint/DisplayItems.h (right): https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Source/platform/graphics/paint/DisplayItems.h#newcode22 third_party/WebKit/Source/platform/graphics/paint/DisplayItems.h:22: // Currently the limiting factor is TransformtionMatrix (in Transformtion ...
5 years, 2 months ago (2015-10-09 04:45:50 UTC) #11
pdr.
Didn't mean to snipe the review there, just an accidental collision a few minutes apart. ...
5 years, 2 months ago (2015-10-09 05:28:32 UTC) #12
jbroman
https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h File third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h (right): https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h#newcode36 third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h:36: class PLATFORM_EXPORT DisplayItemList { On 2015/10/09 at 03:57:51, pdr ...
5 years, 2 months ago (2015-10-13 18:20:56 UTC) #13
pdr.
5 years, 2 months ago (2015-10-13 18:30:33 UTC) #14
Message was sent while issue was closed.
https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h
(right):

https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h:36: class
PLATFORM_EXPORT DisplayItemList {
On 2015/10/13 at 18:20:56, jbroman wrote:
> On 2015/10/09 at 03:57:51, pdr wrote:
> > I'm worried about the name of this class because it is confusing how this
differs from DisplayItems and it is not clear that this is where the previous
and current paint data comes together.
> 
> Right, as I said in the original review email, I'd like to rename it. Doing
the massive search+replace in this CL seemed like it would make the review
harder.
> 
> > What do you think about naming this "PaintController"?
> 
> Works for me, though I'm happy to bikeshed. The working title in my head was
"PaintArtifactBuilder", but I think I like yours more.

I sort of think of builders as having temporary state, whereas "controller" kind
of implies long-living state. On the other hand, it really is building more than
controlling. I looked at the design patterns book and couldn't find a name for
what we're doing (other than MVC-ish things). I'm happy with whatever as long as
it isn't DisplayItemList :)

https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/graphics/paint/DisplayItems.h (right):

https://codereview.chromium.org/1396783003/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/graphics/paint/DisplayItems.h:28: class
DisplayItems : public ContiguousContainer<DisplayItem, kDisplayItemAlignment> {
On 2015/10/09 at 03:57:51, pdr wrote:
> What do you think about expanding this class a bit to include all individual
display-listy things?
> 
> I think it's reasonable to store the scope stack here since it's implicit in
the current state of the list. So long as we don't regress back to having a
single class that both stores and manages the details of two lists. Doing this
would involve moving processNewItem/beginScope/beginSkippingCache/etc here and
disentangling the debug map spaghetti code.
> 
> If you don't agree about going whole hog on display-listy things, an
alternative is to just move processNewItem here and pass in the
scope/skipcache/etc. Doing this would involve moving processNewItem here and
disentangling the debug map spaghetti code.
> 
> 
> There's a common theme in these suggestions about that debug map spaghetti..

This is kind of high-level but I'd like your thoughts.

Powered by Google App Engine
This is Rietveld 408576698