Bug 87046

Summary: [chromium] Port chromium compositor to use WebFilterOperation(s)
Product: WebKit Reporter: James Robinson <jamesr>
Component: New BugsAssignee: James Robinson <jamesr>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, cc-bugs, danakj, dglazkov, enne, fishd, piman, senorblanco, shawnsingh, tkent+wkapi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 87049    
Attachments:
Description Flags
Patch enne: review+

Description James Robinson 2012-05-21 14:34:11 PDT
[chromium] Port chromium compositor to use WebFilterOperation(s)
Comment 1 James Robinson 2012-05-21 14:51:37 PDT
Created attachment 143103 [details]
Patch
Comment 2 WebKit Review Bot 2012-05-21 14:58:02 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 Adrienne Walker 2012-05-21 15:23:48 PDT
Comment on attachment 143103 [details]
Patch

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

R=me.  This is a huge patch, but really straightforward.  How are you handling the Chromium side of this?

> Source/WebCore/platform/graphics/chromium/LayerChromium.cpp:327
> +    if (!backgroundFilters.isEmpty())
> +        CCLayerTreeHost::setNeedsFilterContext(true);

Ack, nice catch.

> Source/WebCore/platform/graphics/chromium/LayerChromium.h:57
> +

nit: needless whitespace
Comment 4 James Robinson 2012-05-21 15:29:22 PDT
There's one caller chromium-side that will break with this.  I think I'll add a #define in WebFilterOperation.h, wrap the chromium side with #ifdefs, land the chromium patch, then land this patch, then remove chromium #ifdefs, then remove the #define.
Comment 5 James Robinson 2012-05-21 15:33:49 PDT
Proposed guard:


diff --git a/Source/Platform/chromium/public/WebFilterOperation.h b/Source/Platform/chromium/public/WebFilterOperation.h
index e1c8270..039f729 100644
--- a/Source/Platform/chromium/public/WebFilterOperation.h
+++ b/Source/Platform/chromium/public/WebFilterOperation.h
@@ -65,6 +65,7 @@ public:
         return m_dropShadowColor;
     }
 
+#define WEBKIT_HAS_NEW_WEBFILTEROPERATION_API 1
     static WebFilterOperation createGrayscaleFilter(float amount) { return WebFilterOperation(FilterTypeGrayscale, amount); }
     static WebFilterOperation createSepiaFilter(float amount) { return WebFilterOperation(FilterTypeSepia, amount); }
     static WebFilterOperation createSaturateFilter(float amount) { return WebFilterOperation(FilterTypeSaturate, amount); }


and chromium-side patch:
https://chromiumcodereview.appspot.com/10414030/

sound good?
Comment 6 Adrienne Walker 2012-05-21 15:36:15 PDT
Looks good to me.
Comment 7 James Robinson 2012-05-21 18:10:12 PDT
Committed r117864: <http://trac.webkit.org/changeset/117864>