Closed
Bug 1418895
Opened 8 years ago
Closed 8 years ago
Very slow mask painting when using an SVG in mask-image
Categories
(Core :: Graphics: WebRender, defect, P1)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla59
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | unaffected |
| firefox59 | --- | fixed |
People
(Reporter: mstange, Assigned: aosmond)
References
Details
(Whiteboard: [wr-mvp])
Attachments
(2 files)
|
416 bytes,
text/html
|
Details | |
|
1.21 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
Profile from testcase: https://perfht.ml/2jGMswY
Steps to reproduce:
1. Enable WebRender and blob-images.
2. Go to https://qz.com/ .
3. Notice that painting in the upper part of the page is really slow.
There's an element with mask-image: url(somesvg.svg). When we prepare the WebRender image for the nsDisplayMask, we use a DrawTargetRecording and call nsCSSRendering::PaintStyleImageLayerWithSC. This draws the SVG image into the DrawTargetRecording using mozilla::image::VectorImage::Draw, which draws it as a surface. This causes us to put all the pixels of that surface into the command stream.
Updated•8 years ago
|
Whiteboard: [wr-mvp] [triage]
Updated•8 years ago
|
Updated•8 years ago
|
Whiteboard: [wr-mvp] [triage] → [wr-reserve]
| Assignee | ||
Comment 1•8 years ago
|
||
In a pinch, I can impute imgIContainer::FLAG_BYPASS_SURFACE_CACHE in VectorImage::Draw if the gfxContext::GetDrawTarget is a recording backend. This will cause us to record the commands as expected. In an ideal world we'd probably store SourceSurfaceRecording in the SurfaceCache, and replay that upon the given DrawTargetRecording, but it looks like DrawTargetRecording doesn't actually support that at this time.
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Updated•8 years ago
|
Priority: P3 → P1
Whiteboard: [wr-reserve] → [wr-mvp]
| Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8931490 -
Flags: review?(tnikkel)
| Assignee | ||
Comment 3•8 years ago
|
||
Updated•8 years ago
|
Attachment #8931490 -
Flags: review?(tnikkel) → review+
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dee67ed7eb78
VectorImage::Draw should imply FLAG_BYPASS_SURFACE_CACHE for DrawTargetRecording. r=tnikkel
Comment 5•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
| Reporter | ||
Comment 6•8 years ago
|
||
This patch made an amazingly huge difference in the performance of that website!
Updated•8 years ago
|
QA Whiteboard: [good first verify]
You need to log in
before you can comment on or make changes to this bug.
Description
•