Use wl_surface_damage_buffer() to propagate wl_buffer damage to avoid rounding errors and
rendering artifacts for HiDPI wl_buffers.
Depends on D45165
Differential Revision: https://phabricator.services.mozilla.com/D45166
--HG--
extra : moz-landing-system : lando
- Rename recent WindowBackBuffer class to WindowBackBufferShm to clearly state that it uses Shm memory to store the pixel buffer.
- Implement WindowBackBufferDMABuf which stores pixel data in GPU memory in WaylandDMABufSurface object.
- Use WaylandDMABufSurface as a wayland backend when DMABuf is available and gfx.wayland_dmabuf_backend.enabled is set.
- Implement WindowImageSurface which temporary stores front buffer pixel data. It's used when front buffer is used by compositor and we want to draw.
Instead of the front/back buffer flip and read-back data from front buffer, don't flip, store the drawing and draw the pixels when compositor
releases the front buffer.
Differential Revision: https://phabricator.services.mozilla.com/D32635
--HG--
extra : moz-landing-system : lando
Lazilly create nsWaylandDisplay objects and remove them at Firefox quit.
nsWaylandDisplay objects should stay as global objects and don't be created/released.
The creation/removal wastes resources on server side as the wl_registry objects at nsWaylandDisplay has to be stored at server
side and can't be removed until firefox ends [1] anyway.
Also the removed nsWaylandDisplay causes crashes when display
topology changes due to the global nature of the wl_registry.
[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_registry
Differential Revision: https://phabricator.services.mozilla.com/D26673
--HG--
extra : moz-landing-system : lando
When xdg_popup window is created, sometimes the underlying wl_surface is changed during map/show event.
We need to check surface ID and recreate the frame callback then.
Differential Revision: https://phabricator.services.mozilla.com/D23662
--HG--
extra : moz-landing-system : lando
Bug 1527804 did not expect multiple moz_container_unmap_wayland()/moz_container_map_wayland() calls. inital_draw_cb should not be cleared in multiple moz_container_unmap_wayland().
Differential Revision: https://phabricator.services.mozilla.com/D21522
--HG--
extra : moz-landing-system : lando
Bug 1514156 expects that nsWindow::OnExposeEvent() is called after frame_callback_handler() called. But it did not happen during opening add-ons(gecko profiler). Then we need to trigger rendering directly from frame_callback_handler() call.
Differential Revision: https://phabricator.services.mozilla.com/D20272
--HG--
extra : moz-landing-system : lando
When GDK_BACKEND is wayland, widget is not fully mapped during creating CompositorSession. Needs to create valid EGLSurface after widget is fully mapped.
Differential Revision: https://phabricator.services.mozilla.com/D18940
To support rounded corners of Gtk+ titlebar themes (Adwaita, Radiance..) in GNOME we need to use X shape mask
as fully transparent toplevel window causes various issues (like Bug 1516224).
We draw mShell as transparent and mContainer as non-transparent with shape mask applied. The shape mask
is generated only when titlebar rendering is enabled and it's generated from GtkHeaderBar Widget
to match the exact look.
We use existing mTransparencyBitmap for the shape mask where mTransparencyBitmapForTitlebar controls
whether it's a general shape mask or our specialised shape for titlebar only.
This is already enabled for GNOME environment by default. So there's a new preference
widget.default-hidden-titlebar added to easily disable it if any issue appears
during testing.
Differential Revision: https://phabricator.services.mozilla.com/D17283
--HG--
extra : moz-landing-system : lando
It's not quaranteed that we have a valid wl_surface at GtkWidget::map event.
In that case create it at GtkWidget::map-event handler which is called after
widget show.
Differential Revision: https://phabricator.services.mozilla.com/D13979
--HG--
extra : moz-landing-system : lando
- Wayland - Set proper scale to wl_egl_window when it's created and resized
- Wayland - Remove unused gtk_widget_set_app_paintable()
Differential Revision: https://phabricator.services.mozilla.com/D13725
--HG--
extra : moz-landing-system : lando
Use frame callback to determine if we can draw to wl_surface owned by GtkWidget and use it as a base for EGL Window.
Differential Revision: https://phabricator.services.mozilla.com/D13722
--HG--
extra : moz-landing-system : lando
- Don't create wl_subsurface in map event but rather when it's requested by compositor.
- Don't create wl_surface at nsWindow::OnExposeEvent but check ready_to_draw instead.
- Rename parent_surface_committed_handler to frame_clock_after_paint_handler.
- Rename parent_surface_committed to ready_to_draw.
- Rename needs_clear to surface_needs_clear.
Depends on D13404
Differential Revision: https://phabricator.services.mozilla.com/D13405
--HG--
extra : moz-landing-system : lando
This patch fixes redrawing of the popup element by removing the scale factor
from the invalid regions because the wl_surface_damage multiplies it with the
scale factor too.
Also we set scaling factor of the wl_surface right after we create it to avoid
flickering when the compositor switches from unscaled to scaled surface.
MozReview-Commit-ID: 1eGoFu87wtF
--HG--
extra : rebase_source : 08abe86889e34865f3eed0f3979b4a584cc74adb
It's based on a solution by Takuro Ashie <ashie@clear-code.com>
MozReview-Commit-ID: FqcdUJQJLdl
--HG--
extra : rebase_source : d4ed4d66439a3693a2f4d5e6a4037ed62969d64f
Original patch author is Takuro Ashie <ashie@clear-code.com>
Provide ability to create native EGL window and provide it under NS_NATIVE_EGL_WINDOW
to GL code. The native EGL window is owned/managed by mozcontainer.
MozReview-Commit-ID: 4d0Kk6DRSaD
--HG--
extra : rebase_source : e4677ce51fbf918eb1b0257c66ca4b7220174bbb