Closed
Bug 1447880
Opened 6 years ago
Closed 6 years ago
blob-image: Use clipping when possible for nsDisplayMask
Categories
(Core :: Graphics: WebRender, enhancement, P2)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
Attachments
(5 files)
16.80 KB,
patch
|
Details | Diff | Splinter Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
mstange
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
mstange
:
review+
|
Details | Review |
Currently we take a bad DrawItemAsLayer path. In the cases where we can get an actual clip path we should use that instead.
Updated•6 years ago
|
Blocks: stage-wr-trains
Priority: -- → P2
Assignee | ||
Comment 1•6 years ago
|
||
nsSVGIntegrationUtils::PaintMaskAndClipPath() should be using a clip path when possible. See "MaskUsage"
Assignee | ||
Comment 2•6 years ago
|
||
If we take some pieces of PaintMaskAndClipPath() we should be able to do regular clipping for clip paths. Also, the layer building/paint as layers stuff shows up in profiles: https://perfht.ml/2qJFmZ6
Assignee | ||
Comment 3•6 years ago
|
||
We can use nsDisplayMask::PaintMask and PushLayer/PopLayer for the cases where we don't have a clip path.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → kmadan
Assignee | ||
Updated•6 years ago
|
Assignee: kshvmdn → jmuizelaar
Assignee | ||
Comment 4•6 years ago
|
||
This will need some kind of solution for handing 3d transforms inside of masks. That could be just making those masks active.
Assignee | ||
Comment 5•6 years ago
|
||
3d transforms inside of masks can be handled with BasicLayerManager. It should be that the frame for the nsDisplayMask gets marked as invalid when the mask changes. We should be able to chop PaintMaskAndClipPath in half if we can get control of the state that it needs between starting the clip and ending the clip.
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
It isn't possible to trigger this code currently because the only way to have an inactive 3d transform is with a mask or filter item and those get handled with a BasicLayerManager. This becomes necessary once we handle mask items internally.
Assignee | ||
Comment 8•6 years ago
|
||
Depends on 6222
Assignee | ||
Comment 9•6 years ago
|
||
This allows us to invalidate individual items inside of the mask instead of treating the mask and it's children as a single item. Depends on 6223
Comment 10•6 years ago
|
||
Comment on attachment 9010127 [details] Bug 1447880. Paint nsDisplayMasks directly instead of using a BasicLayerManager Markus Stange [:mstange] has approved the revision.
Attachment #9010127 -
Flags: review+
Assignee | ||
Comment 11•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2d89177e1bbc6c870f3cf10d2ea89838aa3966c3
Assignee | ||
Comment 12•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a4b097a1a26d5938b63104dbbf7f34440da47fc6
Assignee | ||
Comment 13•6 years ago
|
||
This pulls out a nsDisplayMask::Valid that can be used by blob invalidation to ensure that the mask is drawable.
Assignee | ||
Comment 14•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=76fc0d63ae36b35ccd2055507c48c89ad91d2d41
Updated•6 years ago
|
Attachment #9010993 -
Attachment description: Bug 1447880. Add nsDisplayMask::Valid → Bug 1447880. Add nsDisplayMask::IsValidMask
Comment 15•6 years ago
|
||
Comment on attachment 9010993 [details] Bug 1447880. Add nsDisplayMask::IsValidMask Markus Stange [:mstange] has approved the revision.
Attachment #9010993 -
Flags: review+
Comment 16•6 years ago
|
||
Pushed by jmuizelaar@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4f0db2886781 Handle inactive 3d transforms. r=mstange https://hg.mozilla.org/integration/mozilla-inbound/rev/78784961fe2c Allow PaintMaskAndClipPath to support different ways of painting its children. r=mstange https://hg.mozilla.org/integration/mozilla-inbound/rev/e3136af29c89 Add nsDisplayMask::IsValidMask. r=mstange https://hg.mozilla.org/integration/mozilla-inbound/rev/5cd110df8612 Paint nsDisplayMasks directly instead of using a BasicLayerManager. r=mstange
Comment 17•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4f0db2886781 https://hg.mozilla.org/mozilla-central/rev/78784961fe2c https://hg.mozilla.org/mozilla-central/rev/e3136af29c89 https://hg.mozilla.org/mozilla-central/rev/5cd110df8612
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•