Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
Created attachment 174580 [details] Patch
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.
Created attachment 174747 [details] Patch
caseq can you please have a look?
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.
Comment on attachment 174747 [details] Patch LGTM. Pavel?
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.
Created attachment 176055 [details] Patch
Comment on attachment 176055 [details] Patch Clearing flags on attachment: 176055 Committed r135881: <http://trac.webkit.org/changeset/135881>
All reviewed patches have been landed. Closing bug.