Bug 74786

Summary: Do accelerated filtering when drop-shadow is not the last filter in the chain
Product: WebKit Reporter: Chris Marrin <cmarrin>
Component: Layout and RenderingAssignee: Chris Marrin <cmarrin>
Status: NEW ---    
Severity: Normal CC: aroben, dino, krit, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 68479    
Bug Blocks: 68469    

Description Chris Marrin 2011-12-17 05:14:43 PST
With https://bugs.webkit.org/show_bug.cgi?id=68479 filters are accelerated on CALayers. But the drop-shadow filter is done with CA's shadow properties which are applied after filters. So currently drop-shadow has to be the last filter in the chain or we don't accelerate filters. We could add a parent layer which could render all the filters that come after the drop-shadow.
Comment 1 Chris Marrin 2011-12-17 09:53:27 PST
Add webkit-bug-importer to CC list
Comment 2 Adam Roben (:aroben) 2011-12-19 07:23:03 PST
(Pinging bug importer)
Comment 3 Radar WebKit Bug Importer 2011-12-19 08:26:30 PST
<rdar://problem/10601044>
Comment 4 Dirk Schulze 2013-04-08 22:30:31 PDT
I might be wrong, but if I understand the code correctly, each filter is added to a filter chain "array". Would it be much slower to replace a drop shadow with
* a blur filter
* 2 compositing filter (one compositing with a flood color)
* 1 affineTransform filter

I just looked at the CIFilter path, but it doesn't look so much different to CAFilter, does it? I couldn't find official docs for CAFilter.
Comment 5 Dean Jackson 2013-04-20 14:22:43 PDT
(In reply to comment #4)
> I might be wrong, but if I understand the code correctly, each filter is added to a filter chain "array". Would it be much slower to replace a drop shadow with
> * a blur filter
> * 2 compositing filter (one compositing with a flood color)
> * 1 affineTransform filter
> 
> I just looked at the CIFilter path, but it doesn't look so much different to CAFilter, does it? I couldn't find official docs for CAFilter.

We could do this with CI but not CA filters (because they don't have a blend that takes two inputs).