WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 82057
[chromium] Record painted pixel counts for measuring effectiveness of per-tile painting
https://bugs.webkit.org/show_bug.cgi?id=82057
Summary
[chromium] Record painted pixel counts for measuring effectiveness of per-til...
Dana Jansens
Reported
2012-03-23 08:53:02 PDT
[chromium] Record invalidated vs painted pixel counts for measuring effectiveness of per-tile painting
Attachments
Patch
(15.11 KB, patch)
2012-03-23 08:58 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(15.49 KB, patch)
2012-03-23 11:59 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(13.48 KB, patch)
2012-03-23 14:01 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dana Jansens
Comment 1
2012-03-23 08:58:33 PDT
Created
attachment 133494
[details]
Patch
Dana Jansens
Comment 2
2012-03-23 09:06:10 PDT
This goes out to all the peeps in Boston.
David Reveman
Comment 3
2012-03-23 09:26:02 PDT
Comment on
attachment 133494
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=133494&action=review
Dana, thanks for taking care of this!
> Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:482 > + occlusion->overdrawMetrics().didPaint(m_paintRect);
Rather than reporting the paint rectangle here, could we have the PixelsPainted metric reflect the pixels that were actually painted by the texture updater? So if I turn on per-tile painting the PixelsPainted metric would go down. For BitmapCanvasLayerTextureUpdater report the area painted in LayerTextureUpdate::prepareToUpdate and for BitmapSkPictureCanvasLayerTextureUpdater instead report the playback areas in LayerTextureUpdate::prepareRect. What do you think?
Dana Jansens
Comment 4
2012-03-23 09:30:38 PDT
Comment on
attachment 133494
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=133494&action=review
>> Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:482 >> + occlusion->overdrawMetrics().didPaint(m_paintRect); > > Rather than reporting the paint rectangle here, could we have the PixelsPainted metric reflect the pixels that were actually painted by the texture updater? So if I turn on per-tile painting the PixelsPainted metric would go down. For BitmapCanvasLayerTextureUpdater report the area painted in LayerTextureUpdate::prepareToUpdate and for BitmapSkPictureCanvasLayerTextureUpdater instead report the playback areas in LayerTextureUpdate::prepareRect. > > What do you think?
That is covered by adding the pixels "drawn" (uploaded) transparent + opaque.
Dana Jansens
Comment 5
2012-03-23 09:31:47 PDT
Unless the pixels painted by the updater, and uploaded, can differ?
David Reveman
Comment 6
2012-03-23 09:38:10 PDT
Ah, I see. Yeah, it looks like this should do it! Could you add a unit test that uses explicit texture updater types to ensure that this works correctly?
Dana Jansens
Comment 7
2012-03-23 11:59:27 PDT
Created
attachment 133529
[details]
Patch Added some comments to the overdraw metrics header. Especially to clarify that painted pixels != rasterized pixels, as we will be interested in tracking rasterized pixels in the future, in order to determine wins of different approaches to texture updating.
David Reveman
Comment 8
2012-03-23 12:13:05 PDT
Comment on
attachment 133529
[details]
Patch LGTM
Adrienne Walker
Comment 9
2012-03-23 13:43:53 PDT
Comment on
attachment 133529
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=133529&action=review
> Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:471 > + if (occlusion) > + occlusion->overdrawMetrics().didInvalidate(tile->m_dirtyRect); > +
I might just be bikeshedding here, but "invalidate" is kind of misleading. It isn't "pixels invalidated" it's really "pixels within the visible layer rect that are not on tiles that are entirely occluded". If anything, this value seems kind of redundant with the information that you're getting out of "total pixels drawn"?
Dana Jansens
Comment 10
2012-03-23 13:50:27 PDT
Comment on
attachment 133529
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=133529&action=review
>> Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:471 >> + > > I might just be bikeshedding here, but "invalidate" is kind of misleading. It isn't "pixels invalidated" it's really "pixels within the visible layer rect that are not on tiles that are entirely occluded". If anything, this value seems kind of redundant with the information that you're getting out of "total pixels drawn"?
Yeh, I agree. I wanted the pixels that we "have to paint" vs "did paint", but it is the same as what we are uploading.
Dana Jansens
Comment 11
2012-03-23 14:01:36 PDT
Created
attachment 133553
[details]
Patch
Dana Jansens
Comment 12
2012-03-23 14:04:13 PDT
Removed the invalidated pixel metric, just counting pixels painted by webkit.
Adrienne Walker
Comment 13
2012-03-23 14:12:02 PDT
Comment on
attachment 133553
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=133553&action=review
> Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:151 > + if (paintedCounterName) { > + // This must be in a different scope than the TRACE_EVENT2 above. > + TRACE_EVENT1("webkit", "CCOverdrawPaintMetrics", paintedCounterName, m_pixelsPainted); > + }
Why? Can you not TRACE_EVENT2 or TRACE_EVENT3, depending on which path you're in, so that all the values are grouped together?
Dana Jansens
Comment 14
2012-03-23 14:16:18 PDT
(In reply to
comment #13
)
> (From update of
attachment 133553
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=133553&action=review
> > > Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:151 > > + if (paintedCounterName) { > > + // This must be in a different scope than the TRACE_EVENT2 above. > > + TRACE_EVENT1("webkit", "CCOverdrawPaintMetrics", paintedCounterName, m_pixelsPainted); > > + } > > Why? Can you not TRACE_EVENT2 or TRACE_EVENT3, depending on which path you're in, so that all the values are grouped together?
There is currently no TRACE_EVENT3, though jbates has an open bug to allow more than 2 axes of data in a single trace/counter. The scoping issue is because of compile errors, the macros expect only one such trace to exist within a scope.
Adrienne Walker
Comment 15
2012-03-23 14:21:28 PDT
(In reply to
comment #14
)
> (In reply to
comment #13
) > > (From update of
attachment 133553
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=133553&action=review
> > > > > Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:151 > > > + if (paintedCounterName) { > > > + // This must be in a different scope than the TRACE_EVENT2 above. > > > + TRACE_EVENT1("webkit", "CCOverdrawPaintMetrics", paintedCounterName, m_pixelsPainted); > > > + } > > > > Why? Can you not TRACE_EVENT2 or TRACE_EVENT3, depending on which path you're in, so that all the values are grouped together? > > There is currently no TRACE_EVENT3, though jbates has an open bug to allow more than 2 axes of data in a single trace/counter.
Oh! My misunderstanding.
WebKit Review Bot
Comment 16
2012-03-23 15:09:16 PDT
Comment on
attachment 133553
[details]
Patch Clearing flags on attachment: 133553 Committed
r111913
: <
http://trac.webkit.org/changeset/111913
>
WebKit Review Bot
Comment 17
2012-03-23 15:09:21 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug