2013-10-13 07:47:53 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
#ifndef META_SURFACE_ACTOR_PRIVATE_H
|
|
|
|
#define META_SURFACE_ACTOR_PRIVATE_H
|
|
|
|
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "config.h"
|
2013-10-13 07:47:53 -04:00
|
|
|
|
2018-11-24 12:27:29 -05:00
|
|
|
#include "backends/meta-backend-types.h"
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "meta/meta-shaped-texture.h"
|
|
|
|
#include "meta/window.h"
|
2013-10-13 07:47:53 -04:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2018-10-31 06:47:17 -04:00
|
|
|
#define META_TYPE_SURFACE_ACTOR (meta_surface_actor_get_type ())
|
|
|
|
G_DECLARE_DERIVABLE_TYPE (MetaSurfaceActor,
|
|
|
|
meta_surface_actor,
|
|
|
|
META, SURFACE_ACTOR,
|
|
|
|
ClutterActor)
|
2013-10-13 07:47:53 -04:00
|
|
|
|
|
|
|
struct _MetaSurfaceActorClass
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
ClutterActorClass parent_class;
|
window-actor: Split into two subclasses of MetaSurfaceActor
The rendering logic before was somewhat complex. We had three independent
cases to take into account when doing rendering:
* X11 compositor. In this case, we're a traditional X11 compositor,
not a Wayland compositor. We use XCompositeNameWindowPixmap to get
the backing pixmap for the window, and deal with the COMPOSITE
extension messiness.
In this case, meta_is_wayland_compositor() is FALSE.
* Wayland clients. In this case, we're a Wayland compositor managing
Wayland surfaces. The rendering for this is fairly straightforward,
as Cogl handles most of the complexity with EGL and SHM buffers...
Wayland clients give us the input and opaque regions through
wl_surface.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND.
* XWayland clients. In this case, we're a Wayland compositor, like
above, and XWayland hands us Wayland surfaces. XWayland handles
the COMPOSITE extension messiness for us, and hands us a buffer
like any other Wayland client. We have to fetch the input and
opaque regions from the X11 window ourselves.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11.
We now split the rendering logic into two subclasses, which are:
* MetaSurfaceActorX11, which handles the X11 compositor case, in that
it uses XCompositeNameWindowPixmap to get the backing pixmap, and
deal with all the COMPOSITE extension messiness.
* MetaSurfaceActorWayland, which handles the Wayland compositor case
for both native Wayland clients and XWayland clients. XWayland handles
COMPOSITE for us, and handles pushing a surface over through the
xf86-video-wayland DDX.
Frame sync is still in MetaWindowActor, as it needs to work for both the
X11 compositor and XWayland client cases. When Wayland's video display
protocol lands, this will need to be significantly overhauled, as it would
have to work for any wl_surface, including subsurfaces, so we would need
surface-level discretion.
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-01 17:21:11 -05:00
|
|
|
|
|
|
|
void (* process_damage) (MetaSurfaceActor *actor,
|
|
|
|
int x, int y, int width, int height);
|
2019-08-17 04:00:46 -04:00
|
|
|
gboolean (* is_opaque) (MetaSurfaceActor *actor);
|
2013-10-13 07:47:53 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
cairo_surface_t *meta_surface_actor_get_image (MetaSurfaceActor *self,
|
|
|
|
cairo_rectangle_int_t *clip);
|
|
|
|
|
|
|
|
MetaShapedTexture *meta_surface_actor_get_texture (MetaSurfaceActor *self);
|
|
|
|
|
2020-04-24 17:21:26 -04:00
|
|
|
void meta_surface_actor_update_area (MetaSurfaceActor *self,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height);
|
|
|
|
|
2014-02-05 14:06:32 -05:00
|
|
|
gboolean meta_surface_actor_is_obscured (MetaSurfaceActor *self);
|
2013-10-13 07:47:53 -04:00
|
|
|
|
2013-11-21 17:45:05 -05:00
|
|
|
void meta_surface_actor_set_input_region (MetaSurfaceActor *self,
|
|
|
|
cairo_region_t *region);
|
|
|
|
void meta_surface_actor_set_opaque_region (MetaSurfaceActor *self,
|
|
|
|
cairo_region_t *region);
|
2016-03-21 16:43:50 -04:00
|
|
|
cairo_region_t * meta_surface_actor_get_opaque_region (MetaSurfaceActor *self);
|
2013-10-13 07:47:53 -04:00
|
|
|
|
window-actor: Split into two subclasses of MetaSurfaceActor
The rendering logic before was somewhat complex. We had three independent
cases to take into account when doing rendering:
* X11 compositor. In this case, we're a traditional X11 compositor,
not a Wayland compositor. We use XCompositeNameWindowPixmap to get
the backing pixmap for the window, and deal with the COMPOSITE
extension messiness.
In this case, meta_is_wayland_compositor() is FALSE.
* Wayland clients. In this case, we're a Wayland compositor managing
Wayland surfaces. The rendering for this is fairly straightforward,
as Cogl handles most of the complexity with EGL and SHM buffers...
Wayland clients give us the input and opaque regions through
wl_surface.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND.
* XWayland clients. In this case, we're a Wayland compositor, like
above, and XWayland hands us Wayland surfaces. XWayland handles
the COMPOSITE extension messiness for us, and hands us a buffer
like any other Wayland client. We have to fetch the input and
opaque regions from the X11 window ourselves.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11.
We now split the rendering logic into two subclasses, which are:
* MetaSurfaceActorX11, which handles the X11 compositor case, in that
it uses XCompositeNameWindowPixmap to get the backing pixmap, and
deal with all the COMPOSITE extension messiness.
* MetaSurfaceActorWayland, which handles the Wayland compositor case
for both native Wayland clients and XWayland clients. XWayland handles
COMPOSITE for us, and handles pushing a surface over through the
xf86-video-wayland DDX.
Frame sync is still in MetaWindowActor, as it needs to work for both the
X11 compositor and XWayland client cases. When Wayland's video display
protocol lands, this will need to be significantly overhauled, as it would
have to work for any wl_surface, including subsurfaces, so we would need
surface-level discretion.
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-01 17:21:11 -05:00
|
|
|
void meta_surface_actor_process_damage (MetaSurfaceActor *actor,
|
|
|
|
int x, int y, int width, int height);
|
2020-05-29 13:18:47 -04:00
|
|
|
|
2019-08-17 04:00:46 -04:00
|
|
|
gboolean meta_surface_actor_is_opaque (MetaSurfaceActor *actor);
|
window-actor: Split into two subclasses of MetaSurfaceActor
The rendering logic before was somewhat complex. We had three independent
cases to take into account when doing rendering:
* X11 compositor. In this case, we're a traditional X11 compositor,
not a Wayland compositor. We use XCompositeNameWindowPixmap to get
the backing pixmap for the window, and deal with the COMPOSITE
extension messiness.
In this case, meta_is_wayland_compositor() is FALSE.
* Wayland clients. In this case, we're a Wayland compositor managing
Wayland surfaces. The rendering for this is fairly straightforward,
as Cogl handles most of the complexity with EGL and SHM buffers...
Wayland clients give us the input and opaque regions through
wl_surface.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND.
* XWayland clients. In this case, we're a Wayland compositor, like
above, and XWayland hands us Wayland surfaces. XWayland handles
the COMPOSITE extension messiness for us, and hands us a buffer
like any other Wayland client. We have to fetch the input and
opaque regions from the X11 window ourselves.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11.
We now split the rendering logic into two subclasses, which are:
* MetaSurfaceActorX11, which handles the X11 compositor case, in that
it uses XCompositeNameWindowPixmap to get the backing pixmap, and
deal with all the COMPOSITE extension messiness.
* MetaSurfaceActorWayland, which handles the Wayland compositor case
for both native Wayland clients and XWayland clients. XWayland handles
COMPOSITE for us, and handles pushing a surface over through the
xf86-video-wayland DDX.
Frame sync is still in MetaWindowActor, as it needs to work for both the
X11 compositor and XWayland client cases. When Wayland's video display
protocol lands, this will need to be significantly overhauled, as it would
have to work for any wl_surface, including subsurfaces, so we would need
surface-level discretion.
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-01 17:21:11 -05:00
|
|
|
|
2019-12-06 10:35:37 -05:00
|
|
|
gboolean meta_surface_actor_is_frozen (MetaSurfaceActor *actor);
|
2014-02-24 16:00:12 -05:00
|
|
|
void meta_surface_actor_set_frozen (MetaSurfaceActor *actor,
|
|
|
|
gboolean frozen);
|
window-actor: Split into two subclasses of MetaSurfaceActor
The rendering logic before was somewhat complex. We had three independent
cases to take into account when doing rendering:
* X11 compositor. In this case, we're a traditional X11 compositor,
not a Wayland compositor. We use XCompositeNameWindowPixmap to get
the backing pixmap for the window, and deal with the COMPOSITE
extension messiness.
In this case, meta_is_wayland_compositor() is FALSE.
* Wayland clients. In this case, we're a Wayland compositor managing
Wayland surfaces. The rendering for this is fairly straightforward,
as Cogl handles most of the complexity with EGL and SHM buffers...
Wayland clients give us the input and opaque regions through
wl_surface.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND.
* XWayland clients. In this case, we're a Wayland compositor, like
above, and XWayland hands us Wayland surfaces. XWayland handles
the COMPOSITE extension messiness for us, and hands us a buffer
like any other Wayland client. We have to fetch the input and
opaque regions from the X11 window ourselves.
In this case, meta_is_wayland_compositor() is TRUE and
priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11.
We now split the rendering logic into two subclasses, which are:
* MetaSurfaceActorX11, which handles the X11 compositor case, in that
it uses XCompositeNameWindowPixmap to get the backing pixmap, and
deal with all the COMPOSITE extension messiness.
* MetaSurfaceActorWayland, which handles the Wayland compositor case
for both native Wayland clients and XWayland clients. XWayland handles
COMPOSITE for us, and handles pushing a surface over through the
xf86-video-wayland DDX.
Frame sync is still in MetaWindowActor, as it needs to work for both the
X11 compositor and XWayland client cases. When Wayland's video display
protocol lands, this will need to be significantly overhauled, as it would
have to work for any wl_surface, including subsurfaces, so we would need
surface-level discretion.
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-01 17:21:11 -05:00
|
|
|
|
2018-11-24 12:27:29 -05:00
|
|
|
void meta_surface_actor_set_transform (MetaSurfaceActor *self,
|
|
|
|
MetaMonitorTransform transform);
|
2019-02-20 10:23:04 -05:00
|
|
|
void meta_surface_actor_set_viewport_src_rect (MetaSurfaceActor *self,
|
|
|
|
graphene_rect_t *src_rect);
|
2018-11-30 09:34:00 -05:00
|
|
|
void meta_surface_actor_reset_viewport_src_rect (MetaSurfaceActor *self);
|
|
|
|
void meta_surface_actor_set_viewport_dst_size (MetaSurfaceActor *self,
|
|
|
|
int dst_width,
|
|
|
|
int dst_height);
|
|
|
|
void meta_surface_actor_reset_viewport_dst_size (MetaSurfaceActor *self);
|
2013-10-13 07:47:53 -04:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* META_SURFACE_ACTOR_PRIVATE_H */
|