Open Bug 1739295 Opened 3 years ago Updated 7 months ago

layerization on google slides is bad

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: jrmuizel, Assigned: nical)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

Attachments

(7 files, 2 obsolete files)

e.g. https://docs.google.com/presentation/d/10CTMoztn2LiX-Og5TDSuXUsEDrqwTAZFssDDsAprsQg/edit?skip_itp2_check=true#slide=id.ge0ba69ed88_21_0

We're getting a bunch of layerization because of will-change: opacity;. This causes all of the parent opacity/transforms to become active as well.

Attached file Just the SVG

Chrome also layerizes but I haven't been able to figure out if it does a better job

We're getting an overdraw of about 2.5x here. It looks like non-WebRender would probably get something similar.

This reduced test case shows a problem that we have that causes extra layerization. The rough structure o the page is:

<svg>
 <rect area=lots id=A>
 <g transform>
    <rect area=lots id=B>
    <g style="will-change: opacity">
      <text>Mobile</text>
    </g>
 </g>
</svg>

The will-change: opacity forces the <g transform> to be active which prevents rect A and rect B from being merged into the same layer.

I looked a bit into what Chrome does for layerization but there seem to be bugs so I'd like those fixed or understood first.

Severity: -- → S3
Blocks: 1389712
Depends on: 1741482

The goal of the GroupingState struct is to allow a followup patch to recursively group while keeping track of the item range, so that we can make better grouping decisions.
In addition there's an armada of builders and helpers passed everywhere through the various functions involved. Putting them in the Builders struct simplifies that a bit.

Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED

This attempts to make the grouping logic recursive so that we can make an item active without making it's parent active.

Part of the challenge is that determining the proper item range isn't enough for the painting code to do the same traversal.

More readable than before

Depends on: 1753404
Depends on: 1754829
Depends on: 1756662
Depends on: 1756992
Depends on: 1757396
Depends on: 1757588
Depends on: 1758942
Depends on: 1759526
Attachment #9258041 - Attachment is obsolete: true
Depends on: 1761002
Depends on: 1761007
Depends on: 1761770

Comment on attachment 9269057 [details]
Bug 1739295 - Adjust reftest expectations. r=#gfx-reviewers

Revision D141846 was moved to bug 1686654. Setting attachment 9269057 [details] to obsolete.

Attachment #9269057 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: