mirror of
https://github.com/brl/mutter.git
synced 2025-07-11 04:57:18 +00:00
wayland/surface: Add support for wp_viewporter
This adds the required bits to wayland surfaces and ties them up to the compositor parts. It is based on and very similar in nature to buffer transforms. From the specification: > The global interface exposing surface cropping and scaling > capabilities is used to instantiate an interface extension for a > wl_surface object. This extended interface will then allow cropping > and scaling the surface contents, effectively disconnecting the > direct relationship between the buffer and the surface size. https://gitlab.gnome.org/GNOME/mutter/merge_requests/323
This commit is contained in:

committed by
Jonas Ådahl

parent
edfe5cc3b7
commit
ba7af4f7d3
@ -207,6 +207,27 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
|
||||
|
||||
meta_surface_actor_set_transform (surface_actor, surface->buffer_transform);
|
||||
|
||||
if (surface->viewport.has_src_rect)
|
||||
{
|
||||
meta_surface_actor_set_viewport_src_rect (surface_actor,
|
||||
&surface->viewport.src_rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_surface_actor_reset_viewport_src_rect (surface_actor);
|
||||
}
|
||||
|
||||
if (surface->viewport.has_dst_size)
|
||||
{
|
||||
meta_surface_actor_set_viewport_dst_size (surface_actor,
|
||||
surface->viewport.dst_width,
|
||||
surface->viewport.dst_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_surface_actor_reset_viewport_dst_size (surface_actor);
|
||||
}
|
||||
|
||||
for (l = surface->subsurfaces; l; l = l->next)
|
||||
{
|
||||
MetaWaylandSurface *subsurface_surface = l->data;
|
||||
|
Reference in New Issue
Block a user