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
This commit is contained in:
Jonas Ådahl 2018-12-20 17:37:48 +01:00 committed by Georges Basile Stavracas Neto
parent c84d7ebc6d
commit 012691bebf

View File

@ -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: