mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 23:46:33 -05:00
cogl/texture: Make is_get_data_supported() a bool on the texture
Comparing the gl target is not enough. More on that later. https://gitlab.gnome.org/GNOME/mutter/merge_requests/687
This commit is contained in:
parent
ac5d9ec558
commit
e6c8939c30
@ -47,6 +47,7 @@ struct _CoglTexture2D
|
||||
gboolean auto_mipmap;
|
||||
gboolean mipmaps_dirty;
|
||||
gboolean is_foreign;
|
||||
gboolean is_get_data_supported;
|
||||
|
||||
/* TODO: factor out these OpenGL specific members into some form
|
||||
* of driver private state. */
|
||||
|
@ -106,6 +106,7 @@ _cogl_texture_2d_create_base (CoglContext *ctx,
|
||||
|
||||
tex_2d->mipmaps_dirty = TRUE;
|
||||
tex_2d->auto_mipmap = TRUE;
|
||||
tex_2d->is_get_data_supported = TRUE;
|
||||
|
||||
tex_2d->gl_target = GL_TEXTURE_2D;
|
||||
|
||||
|
@ -508,6 +508,7 @@ allocate_custom_egl_image_external (CoglTexture2D *tex_2d,
|
||||
|
||||
tex_2d->internal_format = internal_format;
|
||||
tex_2d->gl_target = GL_TEXTURE_EXTERNAL_OES;
|
||||
tex_2d->is_get_data_supported = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -834,10 +835,7 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
|
||||
gboolean
|
||||
_cogl_texture_2d_gl_is_get_data_supported (CoglTexture2D *tex_2d)
|
||||
{
|
||||
if (tex_2d->gl_target == GL_TEXTURE_EXTERNAL_OES)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
return tex_2d->is_get_data_supported;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user