When a texel from the Vulkan format VK_FORMAT_B8G8R8A8_SRGB is read,
the sRGB to linear conversion is applied independently to the R, G,
and B channels; the A channel has no influence on this. However,
DRM_FORMAT_ARGB8888 buffers are, per Wayland protocol, not encoded
in this fashion; one must first unpremultiply the color channels
before doing sRGB to linear conversion. This commit switches to
handling ARGB8888 and ABGR8888 formats using the general fragment
shader conversion from electrical to optical values.
Introduce a per-page-flip tracking struct passed to the kernel
when we request a page-flip event for an atomic commit. The kernel
will pass us back this pointer when delivering the event.
This eliminates any risk of mixing up events together. In particular,
if two events are pending, or if the CRTC of a connector is swapped,
we no longer blow up in the page-flip event handler.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3753
since 4932e0d347f("backend/drm: ensure plane surfaces are cleaned up on shutdown")
at finish_drm_resources called drm_plane_finsh_surface has already free the fb
Signed-off-by: zhoulei zhoulei@kylinos.cn
Signed-off-by: sunzhguy <sunzhigang1@kylinos.cn>
We want to call the outputs updated signal when an output scale or transform
changes. Otherwise helpers like the scene surface helpers will not be
notified of scale changes and not pass them to clients.
Right now this is done "by chance" because we disable all CRTCs
on shutdown. However, we'll stop doing this. Plus, if disabling
a CRTC fails, we don't cleanup properly.
"View" has been cargo-culted from Weston. In Weston, a view is not
even necessarily a toplevel -- it's just a way to draw an arbitrary
somewhere (a surface may be painted at multiple locations
simultaneously). The Weston concept has been misunderstood and then
was carried over to rootston, Sway, and tinywl.
Let's just use the official Wayland wording instead.
Since commit 5567aefb, fixed modes haven't been automatically generated
for custom modes, so the output management implementation needs to be
able to handle them directly. To avoid polluting the mode list, only a
single custom mode can be listed at a time and will be removed when a
fixed mode is set.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3744
Not needs set GL_DEPTH_TEST, Because when rendering to a framebuffer
that has no depth buffer, depth testing always behaves as though
the test is disabled, The initial value for each capability with
the exception of GL_DITHER is GL_FALSE.
We can just assume CLOCK_MONOTONIC everywhere.
Simplifies the backend API, and fixes clock mismatches when multiple
backends are used together with different clocks.
This function allows compositors to set the _NET_WORKAREA property on
the root window. XWayland clients use _NET_WORKAREA to determine how
much of the screen is not covered by panels/docks. The property is used
for example by Qt to determine areas of the screen that popup menus
should not overlap (see QScreen::availableVirtualGeometry).
TOKEN_STRLEN is not actually the strlen() of the token. It's the
size taken by the token included the final zero byte.
Change the name to make this clearer, and remove unnecessary +1's.