RESOLVED FIXED 102452
Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
https://bugs.webkit.org/show_bug.cgi?id=102452
Summary Plumbing showPaintRects out of InspectorPageAgent to use a different drawing ...
egraether
Reported 2012-11-15 17:59:37 PST
Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
Attachments
Patch (10.44 KB, patch)
2012-11-15 18:04 PST, egraether
no flags
Patch (12.05 KB, patch)
2012-11-16 12:52 PST, egraether
no flags
Patch (11.32 KB, patch)
2012-11-26 13:42 PST, egraether
no flags
egraether
Comment 1 2012-11-15 18:04:42 PST
egraether
Comment 2 2012-11-15 18:18:24 PST
Comment on attachment 174580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=174580&action=review To make the showPaintRects checkbox in the Web Inspector's settings activate the paint rects in the HUDLayer, I implemented a similar plumbing than the one that was used for showFPSCounter. > Source/WebCore/inspector/InspectorPageAgent.cpp:902 > + if (!m_enabled || !m_state->getBoolean(PageAgentState::showPaintRects) || m_client->canShowPaintRects()) This extra check disables the painting of the paint rects into the InspectorOverlay. > Source/WebKit/chromium/src/WebViewImpl.cpp:838 > + return page()->settings()->forceCompositingMode(); This time a good check if the HUDLayer can draw the paint rects is necessary, because the fallback to the software paint rects needs to work. This check is the best I found so far, but it's value can change when page switches happen. This causes the paint rects then to switch between software and GPU rendering.
egraether
Comment 3 2012-11-16 12:52:01 PST
egraether
Comment 4 2012-11-16 12:53:05 PST
caseq can you please have a look?
WebKit Review Bot
Comment 5 2012-11-16 12:55:06 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Andrey Kosyakov
Comment 6 2012-11-20 10:41:36 PST
Comment on attachment 174747 [details] Patch LGTM. Pavel?
Pavel Feldman
Comment 7 2012-11-20 10:51:21 PST
Comment on attachment 174747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=174747&action=review Looks good overall, couple of naming nits and it can land. > Source/WebCore/inspector/InspectorClient.h:75 > + virtual bool canShowPaintRects() { return false; } So its semantics is a bit different: it tells you whether embedder should handle paint rects. I'd name it overridesShowPaintRects(). > Source/WebKit/chromium/public/WebView.h:474 > + virtual bool canShowHUDLayer() = 0; Should this be called isAcceleratedCompositingActive ? Just to make things more clear.
egraether
Comment 8 2012-11-26 13:42:59 PST
WebKit Review Bot
Comment 9 2012-11-27 10:53:18 PST
Comment on attachment 176055 [details] Patch Clearing flags on attachment: 176055 Committed r135881: <http://trac.webkit.org/changeset/135881>
WebKit Review Bot
Comment 10 2012-11-27 10:53:23 PST
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.