summaryrefslogtreecommitdiff
path: root/src/compositor/meta-shaped-texture.c
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2018-12-20 17:37:48 +0100
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-01-03 10:26:13 +0000
commit012691bebf31affc98288aa1490e0abc15efcb92 (patch)
tree322616e6f4d2cb7c97fed1005cb006bdfac198ec /src/compositor/meta-shaped-texture.c
parentc84d7ebc6d208b082859cb61b7157db0eedda2cb (diff)
downloadmutter-012691bebf31affc98288aa1490e0abc15efcb92.tar.gz
shaped-texture: Draw external textures via offscreen
EGLStream textures are imported as GL_TEXTURE_EXTERNAL_OES and reading pixels directly from them is not supported. To make it possible to get pixels, create an offscreen framebuffer and paint the actor to it, then read pixels from the framebuffer instead of the texture directly. https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
Diffstat (limited to 'src/compositor/meta-shaped-texture.c')
-rw-r--r--src/compositor/meta-shaped-texture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 955375995..bf204bc5b 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -1042,6 +1042,9 @@ meta_shaped_texture_set_transform (MetaShapedTexture *stex,
static gboolean
should_get_via_offscreen (MetaShapedTexture *stex)
{
+ if (!cogl_texture_is_get_data_supported (stex->texture))
+ return TRUE;
+
switch (stex->transform)
{
case META_MONITOR_TRANSFORM_90: