Bug 74786 - Do accelerated filtering when drop-shadow is not the last filter in the chain
Summary: Do accelerated filtering when drop-shadow is not the last filter in the chain
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Marrin
URL:
Keywords: InRadar
Depends on: 68479
Blocks: 68469
  Show dependency treegraph
 
Reported: 2011-12-17 05:14 PST by Chris Marrin
Modified: 2014-03-02 10:15 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).