Closed Bug 1587713 Opened 2 years ago Closed 1 year ago

Remove the late blob rasterization code path

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox72 --- wontfix
firefox77 --- fixed

People

(Reporter: nical, Assigned: nical)

References

(Blocks 2 open bugs, Regressed 1 open bug)

Details

Attachments

(4 files)

We want to only rasterize blobs during scene building. This would simplify a whole lot of error-prone code and ensure we never do blob rasterization on the render backend.

To do this we have to ensure that blob blob visible areas are not too big.

SVG uses:
const nsRect& untransformedPaintRect =
aWrappingItem->GetUntransformedPaintRect();

Fallback uses:
auto visibleRect = LayerIntRect::FromUnknownRect(
ScaleToOutsidePixelsOffset(
aItem->GetBuildingRect(), scale.width,
scale.height, appUnitsPerDevPixel, residualOffset))
.Intersect(dtRect);

Both of those should have reasonable bounds. Any situation where this isn't true can be considered a bug so I think we can proceed here.

If this change lands without making waves, a lot of complicated blob infrastructure will be removed as a followup.

Attachment #9104955 - Attachment description: Bug 1587713 - Adjust the tests. r=jrmuizel → Bug 1587713 - Adjust the tests to account for transform layerization changes with webrender. r=jrmuizel

When blobs were lazily rasterized it was relatively cheap to create very large blob layers. Now that we move to pre-rasetrizing all blob tiles during scene building, large blob layers cause excessive memory allocation and CPU usage.

Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99c2a028927d
Don't limit the number of rasterized blob tiles per transaction. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/218965aab2d5
Avoid layerizing very large blobs due to animated transforms. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/f32d7f9eb04f
Adjust the tests to account for transform layerization changes with webrender. r=jrmuizel
Assignee: nobody → nical.bugzilla

I haven't landed the late blob rasterization removal yet. Before this can happen we need to cache the rasterized content (we currently throw it away after upload), otherwise we get missing tiles after device resets and memory pressure events which we currently rasterize using the late blob rasterization path.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla72 → ---

(In reply to Nicolas Silva [:nical] from comment #8)

I haven't landed the late blob rasterization removal yet. Before this can happen we need to cache the rasterized content (we currently throw it away after upload), otherwise we get missing tiles after device resets and memory pressure events which we currently rasterize using the late blob rasterization path.

Can we continue to throw it away and rely on needing a new scene when a device reset/memory pressure happens?

Flags: needinfo?(nical.bugzilla)

Probably yes, I'll try that.

Flags: needinfo?(nical.bugzilla)
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aff8eef07d07
Remove the late blob rasterization code. r=jrmuizel
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Regressions: 1631293
No longer regressions: 1631293
Regressions: 1698189
You need to log in before you can comment on or make changes to this bug.