Closed Bug 1591489 Opened 6 years ago Closed 6 years ago

Opaque region should be set on MozContainer subsurface

Categories

(Core :: Widget: Gtk, enhancement)

Desktop
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1605120
Tracking Status
firefox72 --- affected

People

(Reporter: heftig, Assigned: heftig)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

The opaque region of a Wayland window should also be set on the MozContainer's subsurface, if it exists. The subsurface is the actual top-level opaque thing that EGL renders to, so if we leave it transparent it will still be composited onto the (opaque) shell window.

The subsurface for the EGL window is actually the opaque thing we care
most about. Without this, the compositor would alpha-blend the
"transparent" EGL window on top of our "opaque" shell window.

Depends on D50628

Assignee: nobody → jan.steffens
Status: NEW → ASSIGNED

Jan, do you want to review this patch or does it work without it?
Thanks.

Flags: needinfo?(jan.steffens)

This patch now has accumulated changes fixing several issues:

  • The one actually in the bug title, which is that the subsurface should be opaque
  • UpdateOpaqueRegion is called very frequently and we should minimize the work we do
  • There's a strip of transparency at the bottom of windows that use CSD but not titlebar rendering (such as the main window with enabled title bar, or the About dialog)
  • An attempt to stop GTK from removing the opaque region on mShell, which happens whenever the "style" is updated or mShell does size allocation (which is triggered very frequently; much more often than mContainer's size-allocate)

I'll revisit this when I have time.

Depends on: 1591488
Flags: needinfo?(jan.steffens)

Please let me know when the patch is ready for review, Thanks.

Blocks: 1602309

Jan, I'd rather go with a patch at Bug 1602309 as it's smaller and fixes the root cause here. We can follow up with the region cache and so on from this patch.

(In reply to Martin Stránský [:stransky] from comment #5)

Jan, I'd rather go with a patch at Bug 1602309 as it's smaller and fixes the root cause here. We can follow up with the region cache and so on from this patch.

Sure; I've just rebased the patch. Assuming 1602309 works and GTK doesn't touch the region anymore, the additional signals doing region overrides in this patch should be unnecessary. I'll revisit the rest when I have time after 1602309 lands.

That said, the original idea of this bug to set the region on the MozContainer subsurface still applies.

(In reply to Jan Alexander Steffens [:heftig] from comment #7)

That said, the original idea of this bug to set the region on the MozContainer subsurface still applies.

Why do we want to set opaque region on MozContainer when we can set it for mShell (parent of MozContainer)?

(In reply to Martin Stránský [:stransky] from comment #8)

Why do we want to set opaque region on MozContainer when we can set it for mShell (parent of MozContainer)?

Because the container's surface is our top level surface. If we leave it transparent, the compositor will still have to blend it with the mShell surface.

Obsoleted by bug 1605120

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Attachment #9104261 - 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: