Propagate input size to CreateSimilarDrawTarget for filters
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
Attachments
(4 files, 3 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
The basic idea here is to add a CreateSimilarDrawTargetForFilter(format, size, FilterNode *filter) that we record instead of CreateSimilarDrawTarget().
When we playback CreateSimilarDrawTargetForFilter we'll do something similar to CreateClippedDrawTarget and compute an actual size that we want to use for the input surface. We do this by adding a method to FilterNode called IntRect MapRectToSource(aRect, aMax). The default implementation of this method returns aMax which is the size passed to CreateSimilarDrawTargetForFilter. Individual FilterNodes can return a rect that is contained by aMax.
FilterNodeComponentTransferSoftware will just call MapRectToSource() on it's inputs. If an input is a SourceSurface we return the rect and so we are able to get a smaller size for when we create the similar draw target.
Assignee | ||
Comment 1•6 years ago
|
||
We end up having to do some gymnastics to build the filter chain before attaching the source, but I think it works out.
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
I have this basically working. There's a problem with subpixel offsets making tile borders visible. I'll need to better understand what's going on in ComputeEffectOffset to figure this out.
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
This lets us avoid drawing the complete input for ever tile when
drawing filters into a tile.
Assignee | ||
Comment 8•6 years ago
|
||
This forwards to an underlying source surface but also has an origin that it
uses to correctly return results from GetRect()
Updated•6 years ago
|
Comment 10•6 years ago
|
||
bugherder |
Assignee | ||
Updated•6 years ago
|
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
Description
•