MotionMark CSS bouncing clipped rectanges runs very poorly

RESOLVED FIXED in mozilla58

Status

()

Core
Graphics: WebRender
P1
normal
RESOLVED FIXED
12 days ago
9 days ago

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Tracking

(Depends on: 2 bugs, Blocks: 1 bug)

unspecified
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 unaffected, firefox58 unaffected)

Details

(Whiteboard: [wr-mvp])

Attachments

(1 attachment)

(Assignee)

Description

12 days ago
http://browserbench.org/MotionMark/developer.html?test-interval=30&display=minimal&tiles=big&controller=ramp&frame-rate=50&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncingclippedrects&complexity=388

I get a score of 69. Chrome gets 400

This is a bunch of transformed rectangles each with a clip mask specified by a polygon.
(Assignee)

Comment 1

12 days ago
I think we might be painting the blob images for the clip masks more than necessary.

Updated

12 days ago
Whiteboard: [wr-mvp] [triage]
(Assignee)

Comment 2

12 days ago
So we're definitely painting new items every frame, but the new items don't obviously show up.
(Assignee)

Comment 3

12 days ago
Also, all of the squares share a single clip path, so if webrender could share them we would go much much faster.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #3)
> Also, all of the squares share a single clip path, so if webrender could
> share them we would go much much faster.

Should we open a separate bug for this part?
Blocks: 1386665
status-firefox57: --- → unaffected
status-firefox58: --- → unaffected
Priority: -- → P2
(In reply to Milan Sreckovic [:milan] from comment #4)
> (In reply to Jeff Muizelaar [:jrmuizel] from comment #3)
> > Also, all of the squares share a single clip path, so if webrender could
> > share them we would go much much faster.
> 
> Should we open a separate bug for this part?

Yes please. Depending on how the display list is structured this might be pretty simple to do.
Depends on: 1415586

Updated

12 days ago
Whiteboard: [wr-mvp] [triage] → [wr-mvp]
(Assignee)

Updated

10 days ago
Depends on: 1415987
(Assignee)

Comment 6

10 days ago
Created attachment 8927021 [details] [diff] [review]
Tolerate slight changes in scale

This helps us avoid rerasterizing the blob images every frame. This makes a huge difference in performance. Our score goes from approx 75 to 380. Current Firefox gets about 200.
Assignee: nobody → jmuizelaar
Attachment #8927021 - Flags: review?(ethlin)
Comment on attachment 8927021 [details] [diff] [review]
Tolerate slight changes in scale

Review of attachment 8927021 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ +507,5 @@
>    // region is unknown until we traverse the displaylist contained by it.
>    if (geometry && !fallbackData->IsInvalid() &&
>        aItem->GetType() != DisplayItemType::TYPE_FILTER &&
> +      aItem->GetType() != DisplayItemType::TYPE_SVG_WRAPPER
> +      differentScale) {

you're missing an operator here

Updated

10 days ago
Status: NEW → ASSIGNED
Priority: P2 → P1

Updated

10 days ago
Attachment #8927021 - Flags: review?(ethlin) → review+

Comment 8

10 days ago
Of course you will fix the compilation errors before landing.

Comment 9

10 days ago
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5bee2596ae4d
Tolerate slight changes in scale for fallback items. r=ethlin

Comment 10

9 days ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5bee2596ae4d
Status: ASSIGNED → RESOLVED
Last Resolved: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.