Hang with nested filter and transform

RESOLVED FIXED in Firefox 63

Status

()

enhancement
P3
normal
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: mstange, Assigned: mattwoodrow)

Tracking

({hang, perf})

Trunk
mozilla63
All
macOS
Points:
---

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

This page hangs the Firefox content process on my machine: https://codepen.io/giana/pen/weGGeV

Profile: https://perfht.ml/2rUs7WK
Had a bit of a play with this.

It looks like it's not actually hanging, but instead just drawing white (and quite slowly).

The page is using mix-blend-mode:screen on the root-most <div> element, and then setting an explicit white background color on the body.

Screening anything over white results in white, so it just removes the entirety of the animation.

It seems to me that this is the expected behaviour?

If we remove the root mix-blend-mode attribute, then it seems to work.

Slowness:

*  All the filters have opacity as well, we're pushing a group for the opacity, and the group is the size of the screen each time.
* We spend quite a bit of time creating rounded rect clips in skia for each circle.
* Drawing the circle, converting to un-premultiplied alpha, applying the filter matrix, converting back to premultiplied alpha, and then drawing the surface to the layer takes a while.

The opacity bit seems easily fixable, I'll do that.

The rest is less obvious how to improve at without implementing accelerated filters. Maybe we could do the premultiplication work at the same time as the colour matrix? Not going to make a huge difference though.
Priority: -- → P3
Also looks like the SourceSurface locking in POMTP means that we don't get any parallelism.

https://perfht.ml/2IgQaUM - with the opacity optimized.
Assignee: nobody → matt.woodrow
I took another look at the profile Matt got of this.

It looks like there is some memory allocator contention between the paint thread releasing the last frame's capture list, and the main thread trying to create a new capture list. Not sure exactly what's going on here, or if we can mitigate this. [1]

I wonder if we could reuse the backing memory for the capture list here. That might cut down on some of the churn.

We can record a new frame while painting an old one, so we'd have to swap between two cached lists. With some logic for dropping them for memory pressure or if their size becomes much larger than what's being used each frame.

I'd also like to have a better solution for the case of a page sized filter that doesn't limit our parallelism.

I don't know how to work this into our abstraction layers yet, but it'd be great if our BasicLayerManager here [2] could know to create a tiled capture list like we do in ClientTiledPaintedLayer, and dispatch that as a job to the paint thread to be finished in an atomic operation.

Doing this would require some significant changes to our abstractions and paint thread synchronization, but would help here.

[1] https://perf-html.io/public/13da631e328f82070af6287d9f955c73c7a11494/calltree/?hiddenThreads=5-10&range=2.3172_2.5489&thread=16&threadOrder=0-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-19-1&v=3
[2] https://searchfox.org/mozilla-central/rev/93d2b9860b3d341258c7c5dcd4e278dea544432b/layout/svg/nsSVGIntegrationUtils.cpp#415
Comment on attachment 8986944 [details]
Bug 1372458 - Fold opacity into filter drawing rather than using a temporary surface.

https://reviewboard.mozilla.org/r/252184/#review261560

Nice.
Attachment #8986944 - Flags: review?(mstange) → review+
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/01837d6c41b6
Fold opacity into filter drawing rather than using a temporary surface. r=mstange
Backed out changeset 01837d6c41b6 (bug 1372458) for Reftest failures on layout/reftests/svg/filters-and-group-opacity-01.svg

Log:
https://treeherder.mozilla.org/logviewer.html#?job_id=186504976&repo=autoland&lineNumber=34895

REFTEST INFO | REFTEST fuzzy test (0, 0) <= (128, 800000) <= (1, 800000)
22:12:19    ERROR -  REFTEST TEST-UNEXPECTED-FAIL | file:///C:/Users/task_1530741082/build/tests/reftest/tests/layout/reftests/svg/filters-and-group-opacity-01.svg == file:///C:/Users/task_1530741082/build/tests/reftest/tests/layout/reftests/svg/filters-and-group-opacity-01-ref.svg | image comparison, max difference: 128, number of differing pixels: 800000
22:12:19     INFO -  REFTEST   IMAGE 1 (TEST): data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAPoCAYAAAAmy5qxAAAVl0lEQVR4nO3OIQHAQBAEsfNv+uuiCyYgPHf3HgAAwD/mAQAAoGMeAAAAOuYBAACgYx4AAAA65gEAAKBjHgAAADrmAQAAoGMeAAAAOuYBAACgYx4AAAA65gEAAKBjHgAAADrmAQAAoGMeAAAAOuYBAACgYx4AAAA65gEAAKBjHgAAADrmAQAAoGMeAAAAOuYBAACgYx4AAAA65gEAAKBjHgAAADrmAQAAoGMeAAAA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MaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQMaAAAAAGQMCAABkDAgAAJAxIAAAQOYCpA+5+bCEOWwAAAAASUVORK5CYII=
22:12:19     INFO -  REFTEST TEST-END | file:///C:/Users/task_1530741082/build/tests/reftest/tests/layout/reftests/svg/filters-and-group-opacity-01.svg == file:///C:/Users/task_1530741082/build/tests/reftest/tests/layout/reftests/svg/filters-and-group-opacity-01-ref.svg

Failure push:
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=01837d6c41b63b21cf7b8ccfe8f8366f08dc7512

Backout:
https://hg.mozilla.org/integration/autoland/rev/4312952f4b2a9d7aaf1ce6cbd2c2fb2834711f7d
Flags: needinfo?(matt.woodrow)
Flags: needinfo?(matt.woodrow)
Comment on attachment 8986944 [details]
Bug 1372458 - Fold opacity into filter drawing rather than using a temporary surface.

https://reviewboard.mozilla.org/r/252184/#review263600

::: gfx/2d/DrawTargetD2D1.cpp:271
(Diff revision 2)
> +                        D2D1::BrushProperties(aOptions.mAlpha, D2DMatrix(mat)),
> +                        getter_AddRefs(imageBrush));
> +  mDC->FillRectangle(D2D1::RectF(aDestPoint.x, aDestPoint.y,
> +                                 aDestPoint.x + aSourceRect.width,
> +                                 aDestPoint.y + aSourceRect.height),
> +                     imageBrush);

Did you look at the perf here? Brush creation has some overhead, it may be best to avoid it here and just do DrawImage in the case where mAlpha == 1.0f, which should be pretty common.
Attachment #8986944 - Flags: review?(bas) → review+
Comment on attachment 8986944 [details]
Bug 1372458 - Fold opacity into filter drawing rather than using a temporary surface.

https://reviewboard.mozilla.org/r/252184/#review263600

> Did you look at the perf here? Brush creation has some overhead, it may be best to avoid it here and just do DrawImage in the case where mAlpha == 1.0f, which should be pretty common.

I didn't check perf, but I've added the check for 1.0f to be sure that we're not regressing the common case.
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d48e40cba0b4
Fold opacity into filter drawing rather than using a temporary surface. r=bas,mstange
https://hg.mozilla.org/mozilla-central/rev/d48e40cba0b4
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Perf win:

== Change summary for alert #14370 (as of Mon, 16 Jul 2018 23:49:27 GMT) ==

Improvements:

  2%  rasterflood_svg windows10-64-msvc opt e10s stylo     10,801.93 -> 10,543.22

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=14370
You need to log in before you can comment on or make changes to this bug.