Bug 87436 - [chromium] Add a setForceRenderSurface to WebLayer for test/bench purpose
Summary: [chromium] Add a setForceRenderSurface to WebLayer for test/bench purpose
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: Antoine Labour
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-24 15:51 PDT by Antoine Labour
Modified: 2012-05-24 18:02 PDT (History)
10 users (show)

See Also:


Attachments
Patch (12.42 KB, patch)
2012-05-24 15:52 PDT, Antoine Labour
no flags Details | Formatted Diff | Diff
Patch for landing (12.28 KB, patch)
2012-05-24 16:28 PDT, Antoine Labour
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Labour 2012-05-24 15:51:52 PDT
[chromium] Add a setForceRenderSurface to WebLayer for test/bench purpose
Comment 1 Antoine Labour 2012-05-24 15:52:48 PDT
Created attachment 143910 [details]
Patch
Comment 2 WebKit Review Bot 2012-05-24 15:55:51 PDT
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 3 Dana Jansens 2012-05-24 15:56:29 PDT
What about just using opacity != 1 with a child layer?
Comment 4 Antoine Labour 2012-05-24 16:00:29 PDT
So that if we ever change the behavior of that (e.g. if this layer doesn't have content, and we only have a single child, we could bubble the opacity down), this still works. Also, changing opacity also means adding blending which has different perf characteristics.
It's really a "use a render surface, no questions asked" flag.
Comment 5 Dana Jansens 2012-05-24 16:05:42 PDT
I do admit I've wanted this before :)
Comment 6 James Robinson 2012-05-24 16:07:02 PDT
Comment on attachment 143910 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=143910&action=review

Seems good but I'd drop the uncalled getters, personally.

> Source/Platform/chromium/public/WebLayer.h:130
> +    WEBKIT_EXPORT bool forceRenderSurface() const;

Why expose a getter? The caller should know if they've set this or not and if they care track it (I suspect many won't care).

Compulsively adding getters everywhere makes me feel a bit like writing I'm writing Java.
Comment 7 Antoine Labour 2012-05-24 16:28:50 PDT
Created attachment 143919 [details]
Patch for landing
Comment 8 Antoine Labour 2012-05-24 16:30:51 PDT
(In reply to comment #6)
> (From update of attachment 143910 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=143910&action=review
> 
> Seems good but I'd drop the uncalled getters, personally.
> 
> > Source/Platform/chromium/public/WebLayer.h:130
> > +    WEBKIT_EXPORT bool forceRenderSurface() const;
> 
> Why expose a getter? The caller should know if they've set this or not and if they care track it (I suspect many won't care).

I don't care either way. Removed

> Compulsively adding getters everywhere makes me feel a bit like writing I'm writing Java.

Nah, that must be because of the coding style ;)
Comment 9 WebKit Review Bot 2012-05-24 18:02:08 PDT
Comment on attachment 143919 [details]
Patch for landing

Clearing flags on attachment: 143919

Committed r118454: <http://trac.webkit.org/changeset/118454>
Comment 10 WebKit Review Bot 2012-05-24 18:02:13 PDT
All reviewed patches have been landed.  Closing bug.