From 012691bebf31affc98288aa1490e0abc15efcb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 20 Dec 2018 17:37:48 +0100 Subject: [PATCH] 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 --- src/compositor/meta-shaped-texture.c | 3 +++ 1 file changed, 3 insertions(+) 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: