[mutter] shaped-texture: Draw external textures via offscreen
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] shaped-texture: Draw external textures via offscreen
- Date: Thu, 3 Jan 2019 11:20:31 +0000 (UTC)
commit 012691bebf31affc98288aa1490e0abc15efcb92
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Dec 20 17:37:48 2018 +0100
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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]