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

Issue 498193003: Add |GraphicsLayerDebugInfo::getAnnotatedInvalidationRects| (Closed)

Created:
6 years, 3 months ago by kouhei (in TOK)
Modified:
6 years, 3 months ago
CC:
abarth-chromium, blink-layers+watch_chromium.org, blink-reviews, blink-reviews-rendering, Rik, danakj, dglazkov+blink, krit, eae+blinkwatch, jamesr, jbroman, jchaffraix+rendering, leviw+renderwatch, pdr., rwlbuis, rune+blink, Stephen Chennney, Ian Vollick, zoltan1
Project:
blink
Visibility:
Public.

Description

Add |GraphicsLayerDebugInfo::getAnnotatedInvalidationRects| This is a Blink side patch for visualizing paint invalidation for newly created RenderObject. Demo @ https://www.youtube.com/watch?v=L-zo91nL2nE&list=UUGC5ommqy7KyPzZ-eGlL_Dg After this CL, GraphicsLayerDebugInfo holds a vector of invalidation rects along with their source / reason. The rects can be queried from the embedder using the method |GraphicsLayerDebugInfo::getAnnotatedInvalidationRects|. This CL also adds a flag |RenderObject::hadPaintInvalidation| to track if the RenderObject had ever been painted. The flag is then used to annotate invalidation rects for first paint of the RenderObject. After this CL, WebLayer implementator can query this info to visualize the layer invalidation including the first paint, which is useful for telling if the repaint storm is due to the page itself, or is a performance bug in Blink rendering stack. BUG=402033 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181774

Patch Set 1 #

Patch Set 2 : add missing clear #

Patch Set 3 : add missing files #

Total comments: 5

Patch Set 4 : use TRACE_EVENT #

Total comments: 3

Patch Set 5 : store flag in platform/graphics/FirstPaintInvalidationTracking #

Patch Set 6 : add copyright #

Patch Set 7 : export symbols #

Patch Set 8 : fix wrong if #

Total comments: 6

Patch Set 9 : tkent-san review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -11 lines) Patch
M Source/core/rendering/RenderLayerRepainter.cpp View 1 chunk +8 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderLayerScrollableArea.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderObject.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 5 chunks +28 lines, -0 lines 0 comments Download
M Source/core/rendering/compositing/CompositedLayerMapping.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/compositing/CompositedLayerMapping.cpp View 1 chunk +5 lines, -3 lines 0 comments Download
M Source/platform/blink_platform.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A Source/platform/graphics/FirstPaintInvalidationTracking.h View 1 chunk +17 lines, -0 lines 0 comments Download
A Source/platform/graphics/FirstPaintInvalidationTracking.cpp View 1 chunk +29 lines, -0 lines 0 comments Download
M Source/platform/graphics/GraphicsLayer.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/platform/graphics/GraphicsLayer.cpp View 3 chunks +7 lines, -1 line 0 comments Download
M Source/platform/graphics/GraphicsLayerDebugInfo.h View 4 chunks +6 lines, -0 lines 0 comments Download
M Source/platform/graphics/GraphicsLayerDebugInfo.cpp View 4 chunks +22 lines, -0 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M public/platform/WebGraphicsLayerDebugInfo.h View 1 chunk +5 lines, -0 lines 0 comments Download
A public/platform/WebInvalidationDebugAnnotations.h View 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (6 generated)
kouhei (in TOK)
kouhei@chromium.org changed reviewers: + chrishtr@chromium.org, jchaffraix@chromium.org, leviw@chromium.org, wangxianzhu@chromium.org
6 years, 3 months ago (2014-08-27 10:37:21 UTC) #1
kouhei (in TOK)
Would you take a look? This is my second attempt after https://codereview.chromium.org/474793002/ . This time, ...
6 years, 3 months ago (2014-08-27 10:37:21 UTC) #2
chrishtr
Do you have a corresponding cc change? I'd like to get it run by enne@ ...
6 years, 3 months ago (2014-08-27 18:48:40 UTC) #3
kouhei (in TOK)
enne: Would you do a high level review if this approach is acceptable to you? ...
6 years, 3 months ago (2014-08-28 07:05:44 UTC) #4
kouhei (in TOK)
enne: Would you take a high level look? Sorry I forgot to add you in ...
6 years, 3 months ago (2014-08-30 14:25:40 UTC) #6
abarth-chromium
https://codereview.chromium.org/498193003/diff/40001/Source/core/rendering/RenderObject.h File Source/core/rendering/RenderObject.h (right): https://codereview.chromium.org/498193003/diff/40001/Source/core/rendering/RenderObject.h#newcode1297 Source/core/rendering/RenderObject.h:1297: ADD_BOOLEAN_BITFIELD(hadPaintInvalidation, HadPaintInvalidation); I don't think we should add bits ...
6 years, 3 months ago (2014-09-02 19:34:58 UTC) #8
enne (OOO)
https://codereview.chromium.org/498193003/diff/40001/Source/platform/graphics/GraphicsLayer.cpp File Source/platform/graphics/GraphicsLayer.cpp (right): https://codereview.chromium.org/498193003/diff/40001/Source/platform/graphics/GraphicsLayer.cpp#newcode905 Source/platform/graphics/GraphicsLayer.cpp:905: m_debugInfo.appendAnnotatedInvalidateRect(rect, annotations); Is there a way to only do ...
6 years, 3 months ago (2014-09-02 19:41:35 UTC) #10
kouhei (in TOK)
https://codereview.chromium.org/498193003/diff/40001/Source/core/rendering/RenderObject.h File Source/core/rendering/RenderObject.h (right): https://codereview.chromium.org/498193003/diff/40001/Source/core/rendering/RenderObject.h#newcode1297 Source/core/rendering/RenderObject.h:1297: ADD_BOOLEAN_BITFIELD(hadPaintInvalidation, HadPaintInvalidation); On 2014/09/02 19:34:58, abarth wrote: > I ...
6 years, 3 months ago (2014-09-03 22:53:48 UTC) #11
dsinclair
https://codereview.chromium.org/498193003/diff/40001/Source/platform/graphics/GraphicsLayer.cpp File Source/platform/graphics/GraphicsLayer.cpp (right): https://codereview.chromium.org/498193003/diff/40001/Source/platform/graphics/GraphicsLayer.cpp#newcode905 Source/platform/graphics/GraphicsLayer.cpp:905: m_debugInfo.appendAnnotatedInvalidateRect(rect, annotations); On 2014/09/03 22:53:47, kouhei wrote: > On ...
6 years, 3 months ago (2014-09-04 15:38:38 UTC) #13
enne (OOO)
Another alternative is to plumb the reason along with the invalidation all the way through ...
6 years, 3 months ago (2014-09-04 17:13:24 UTC) #14
kouhei (in TOK)
Thanks for your feedback! Updated CL to not use a HashSet instead of adding a ...
6 years, 3 months ago (2014-09-04 17:42:35 UTC) #15
enne (OOO)
https://codereview.chromium.org/498193003/diff/60001/Source/platform/graphics/GraphicsLayer.cpp File Source/platform/graphics/GraphicsLayer.cpp (right): https://codereview.chromium.org/498193003/diff/60001/Source/platform/graphics/GraphicsLayer.cpp#newcode74 Source/platform/graphics/GraphicsLayer.cpp:74: TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), &isEnabled); How do you plan on having this ...
6 years, 3 months ago (2014-09-04 18:39:33 UTC) #16
kouhei (in TOK)
https://codereview.chromium.org/498193003/diff/60001/Source/platform/graphics/GraphicsLayer.cpp File Source/platform/graphics/GraphicsLayer.cpp (right): https://codereview.chromium.org/498193003/diff/60001/Source/platform/graphics/GraphicsLayer.cpp#newcode74 Source/platform/graphics/GraphicsLayer.cpp:74: TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), &isEnabled); On 2014/09/04 18:39:33, enne wrote: > How ...
6 years, 3 months ago (2014-09-04 18:58:52 UTC) #17
enne (OOO)
https://codereview.chromium.org/498193003/diff/60001/Source/platform/graphics/GraphicsLayer.cpp File Source/platform/graphics/GraphicsLayer.cpp (right): https://codereview.chromium.org/498193003/diff/60001/Source/platform/graphics/GraphicsLayer.cpp#newcode74 Source/platform/graphics/GraphicsLayer.cpp:74: TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), &isEnabled); On 2014/09/04 18:58:52, kouhei wrote: > On ...
6 years, 3 months ago (2014-09-04 21:39:41 UTC) #18
kouhei (in TOK)
Thanks for your suggestion. The hardest part seems to be how we should conditionally enable ...
6 years, 3 months ago (2014-09-04 22:25:34 UTC) #19
kouhei (in TOK)
Updated CL. > I'm currently thinking of adding a globally accessible flag for 1) "show ...
6 years, 3 months ago (2014-09-05 00:18:10 UTC) #20
kouhei (in TOK)
I think I addressed all comments. Would you take a look?
6 years, 3 months ago (2014-09-08 20:39:31 UTC) #21
chrishtr
lgtm
6 years, 3 months ago (2014-09-09 18:53:31 UTC) #22
kouhei (in TOK)
tkent: Would you take a look at changes in Source/web and platform/?
6 years, 3 months ago (2014-09-09 22:07:51 UTC) #24
tkent
https://codereview.chromium.org/498193003/diff/140001/Source/core/rendering/RenderObject.cpp File Source/core/rendering/RenderObject.cpp (right): https://codereview.chromium.org/498193003/diff/140001/Source/core/rendering/RenderObject.cpp#newcode106 Source/core/rendering/RenderObject.cpp:106: DEFINE_STATIC_LOCAL(RenderObjectWeakSet, set, ()); This set doesn't look traceable. Needs ...
6 years, 3 months ago (2014-09-10 00:03:28 UTC) #25
kouhei (in TOK)
https://codereview.chromium.org/498193003/diff/140001/Source/core/rendering/RenderObject.cpp File Source/core/rendering/RenderObject.cpp (right): https://codereview.chromium.org/498193003/diff/140001/Source/core/rendering/RenderObject.cpp#newcode106 Source/core/rendering/RenderObject.cpp:106: DEFINE_STATIC_LOCAL(RenderObjectWeakSet, set, ()); On 2014/09/10 00:03:27, tkent (overloaded) wrote: ...
6 years, 3 months ago (2014-09-10 23:46:29 UTC) #26
tkent
lgtm
6 years, 3 months ago (2014-09-10 23:49:53 UTC) #27
kouhei (in TOK)
Thanks for review!
6 years, 3 months ago (2014-09-10 23:51:18 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/498193003/160001
6 years, 3 months ago (2014-09-10 23:51:32 UTC) #30
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 23:55:52 UTC) #31
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as 181774

Powered by Google App Engine
This is Rietveld 408576698