Wayland - implement subsurface to draw to mozcontainer

RESOLVED FIXED in Firefox 58

Status

()

P2
minor
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: stransky, Assigned: stransky)

Tracking

(Blocks: 1 bug)

Trunk
mozilla58
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox54 affected, firefox58 fixed)

Details

(Whiteboard: tpi:+)

Attachments

(5 attachments)

(Assignee)

Description

2 years ago
We use GdkWindow from mozcontainer to draw when CSD or Wayland is enabled. It means that the mShell's GdkWindow is used by GDK to draw decorations (usually shadows) and main firefox window is rendered to mContainer which is nested in mShell.

To draw asynchronously (off-main thread) we can no more draw directly to GdkWindow owned by mContainer. This GdkWindow (and its wl_surface) is owned by Gdk and it's updated by Gdk internals from main thread.

Instead we create wl_subsurface which overlays whole mContainer and attach it as child of wl_surface owned by mContainer. The wl_subsurface is owned by us, it's not touched by Gdk and can be drawn off main thread without any collision/deadlock.
(Assignee)

Comment 1

2 years ago
Posted patch wipSplinter Review
WIP patch. Bug 1299083 has to be sorted out first.
(Assignee)

Updated

2 years ago
Depends on: 1299083

Updated

2 years ago
Priority: -- → P3
Whiteboard: tpi:+
(Assignee)

Updated

2 years ago
Depends on: 1341296
(Assignee)

Updated

a year ago
Assignee: nobody → stransky
Comment hidden (mozreview-request)
(Assignee)

Updated

a year ago
Priority: P3 → P2
(Assignee)

Updated

a year ago
Blocks: 1281425

Comment 6

a year ago
mozreview-review
Comment on attachment 8921448 [details]
Bug 1337369 - [Wayland] query wayland registry to get wl_subcompositor for mozcontainer,

https://reviewboard.mozilla.org/r/192486/#review199938
Attachment #8921448 - Flags: review?(jhorak) → review+

Comment 7

a year ago
mozreview-review
Comment on attachment 8921449 [details]
Bug 1337369 - [Wayland] add routines to map/unmap wl_surface as overlay for MozContainer,

https://reviewboard.mozilla.org/r/192488/#review199940
Attachment #8921449 - Flags: review?(jhorak) → review+

Comment 8

a year ago
mozreview-review
Comment on attachment 8921450 [details]
Bug 1337369 - [Wayland] map/unmap overlay MozContainer wl_surface when running on Wayland,

https://reviewboard.mozilla.org/r/192490/#review199942
Attachment #8921450 - Flags: review?(jhorak) → review+

Comment 9

a year ago
mozreview-review
Comment on attachment 8921451 [details]
Bug 1337369 - [Wayland] Expose moz_container_get_wl_surface() to get MozContainer overlayfrom compositor widget,

https://reviewboard.mozilla.org/r/192492/#review199944
Attachment #8921451 - Flags: review?(jhorak) → review+
(Assignee)

Updated

a year ago
Keywords: checkin-needed

Comment 10

a year ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b63c7bc7b0b1
[Wayland] query wayland registry to get wl_subcompositor for mozcontainer, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/8afcd32835fc
[Wayland] add routines to map/unmap wl_surface as overlay for MozContainer, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/63ab95c187d4
[Wayland] map/unmap overlay MozContainer wl_surface when running on Wayland, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/a6aab759a52f
[Wayland] Expose moz_container_get_wl_surface() to get MozContainer overlayfrom compositor widget, r=jhorak
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.