Bug 102452 - Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
Summary: Plumbing showPaintRects out of InspectorPageAgent to use a different drawing ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-15 17:59 PST by egraether
Modified: 2012-11-27 10:53 PST (History)
10 users (show)

See Also:


Attachments
Patch (10.44 KB, patch)
2012-11-15 18:04 PST, egraether
no flags Details | Formatted Diff | Diff
Patch (12.05 KB, patch)
2012-11-16 12:52 PST, egraether
no flags Details | Formatted Diff | Diff
Patch (11.32 KB, patch)
2012-11-26 13:42 PST, egraether
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description egraether 2012-11-15 17:59:37 PST
Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
Comment 1 egraether 2012-11-15 18:04:42 PST
Created attachment 174580 [details]
Patch
Comment 2 egraether 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.
Comment 3 egraether 2012-11-16 12:52:01 PST
Created attachment 174747 [details]
Patch
Comment 4 egraether 2012-11-16 12:53:05 PST
caseq can you please have a look?
Comment 5 WebKit Review Bot 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.
Comment 6 Andrey Kosyakov 2012-11-20 10:41:36 PST
Comment on attachment 174747 [details]
Patch

LGTM. Pavel?
Comment 7 Pavel Feldman 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.
Comment 8 egraether 2012-11-26 13:42:59 PST
Created attachment 176055 [details]
Patch
Comment 9 WebKit Review Bot 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>
Comment 10 WebKit Review Bot 2012-11-27 10:53:23 PST
All reviewed patches have been landed.  Closing bug.