mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
gsk: Support straight alpha textures
This is not the optimal way of doing it: we're reuploading the texture with client-side conversion. But it fits nicely into our current handling of mipmaps. We can do better once we use shaders for colorspace conversions.
This commit is contained in:
parent
e8bdd46d8d
commit
957fa87fce
@ -761,7 +761,8 @@ gsk_gl_driver_load_texture (GskGLDriver *self,
|
||||
GdkGLContext *texture_context = gdk_gl_texture_get_context (gl_texture);
|
||||
|
||||
if (gdk_gl_context_is_shared (context, texture_context) &&
|
||||
(!ensure_mipmap || gdk_gl_texture_has_mipmap (gl_texture)))
|
||||
(!ensure_mipmap || gdk_gl_texture_has_mipmap (gl_texture)) &&
|
||||
gdk_memory_format_alpha (gdk_texture_get_format (texture)) != GDK_MEMORY_ALPHA_STRAIGHT)
|
||||
{
|
||||
/* A GL texture from the same GL context is a simple task... */
|
||||
return gdk_gl_texture_get_id (gl_texture);
|
||||
|
Loading…
Reference in New Issue
Block a user