gecko-dev/widget/gtk/mozwayland
Martin Stransky 4b928e7b91 Bug 1580152 - [Wayland] Fix rendering glitches on wayland , r=jhorak
- Recently we're missing some drawings as we disabled flushing cached images in frame callback. Let's enable it again and make sure we don't flush the drawings between Lock()/Commit() compositor calls which is controlled by mBufferCommitAllowed.

- When we draw directly to wl_buffer, flush all cached drawings we have or clear them if there's fullscreen update. It prevents potential rendering of cached images over unrelevant buffer content.

- Flush cached images when wl_buffer is detached by wayland compositor. It allows to paint delayed drawings and ensures they won't stay in the queue infinitely.

- Use mBufferPendingCommit to indicate that the WaylandBuffer contains updates from gecko which has not been submitted to wayland compositor yet. Allows delated commit handlers (frame callback, delayed commit and when wl_buffer is detached) to send WaylandBuffer content to wayland compositor.

- Record time of last finished commit to mLastCommitTime and throws warning when wayland compositor does not release wl_buffer in 200ms.

- Use wl_display_sync() to synchronize wl_display events. Wait for events from wl_display until all pending events are processed before we start drawing at WindowSurfaceWayland::Lock(). There may wl_buffer release event waiting which releases wl_buffer for rendering.

- Don't use XMost()/YMost() to get drawing area size.

- Remove mDisplayThreadMessageLoop as it's no longer used.

Differential Revision: https://phabricator.services.mozilla.com/D45661

--HG--
extra : moz-landing-system : lando
2019-09-17 12:34:28 +00:00
..
moz.build Bug 1554520 - [Wayland] Load DMABuf setup in WaylandDisplay class, r=jhorak 2019-06-04 08:46:59 +00:00
mozwayland.c Bug 1579794 - [Wayland] Use wl_surface_damage_buffer() and require wl_compositor v.4, r=jhorak 2019-09-10 07:58:56 +00:00
mozwayland.h Bug 1580152 - [Wayland] Fix rendering glitches on wayland , r=jhorak 2019-09-17 12:34:28 +00:00