Bug 93398

Summary: [chromium] Use WebCompositor interface in Platform API instead of CCProxy to query threaded compositor status
Product: WebKit Reporter: James Robinson <jamesr>
Component: New BugsAssignee: James Robinson <jamesr>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, andersca, cc-bugs, dglazkov, enne, eric.carlson, feature-media-reviews, fischman, fishd, nduca, piman, tkent+wkapi, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch abarth: review+

Description James Robinson 2012-08-07 14:49:01 PDT
[chromium] Use WebCompositor interface in Platform API instead of CCProxy to query threaded compositor status
Comment 1 James Robinson 2012-08-07 14:50:49 PDT
Created attachment 157013 [details]
Patch
Comment 2 James Robinson 2012-08-07 14:52:12 PDT
Comment on attachment 157013 [details]
Patch

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

> Source/Platform/chromium/public/WebCompositor.h:53
> +    // Debug only - always returns true in release builds.
> +    // Returns whether we're currently running on the compositor thread.
> +    WEBKIT_EXPORT static bool onCompositorThread();

this feels a little bit skeevy. The implementation code is currently all guarded by #ifndef NDEBUG, and the only caller to this is doing an ASSERT().  One option would be to hide the API itself behind debug-only compile time guards, or decide that the callsite isn't really worth having the API (it's in WebMediaPlayerClientImpl if you want to take a look).
Comment 3 WebKit Review Bot 2012-08-07 14:52:32 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 4 Adam Barth 2012-08-07 14:54:43 PDT
Comment on attachment 157013 [details]
Patch

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

>> Source/Platform/chromium/public/WebCompositor.h:53
>> +    WEBKIT_EXPORT static bool onCompositorThread();
> 
> this feels a little bit skeevy. The implementation code is currently all guarded by #ifndef NDEBUG, and the only caller to this is doing an ASSERT().  One option would be to hide the API itself behind debug-only compile time guards, or decide that the callsite isn't really worth having the API (it's in WebMediaPlayerClientImpl if you want to take a look).

I'd probably just remove it.
Comment 5 James Robinson 2012-08-07 14:59:47 PDT
Sounds reasonable to me. +cc as an FYI
Comment 6 James Robinson 2012-08-07 15:01:55 PDT
Committed r124925: <http://trac.webkit.org/changeset/124925>