mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 01:31:13 +00:00
Don't use GL_SRGB for premultiplied textures
GL_SRGB is doing postmultiplied alpha, so if the texture is premultiplied, we can't use this optimization. The optimization still works for unpremultiplied and opaque images, because those don't do that step.
This commit is contained in:
parent
b801eae00f
commit
ad757cccb6
@ -301,10 +301,14 @@ gsk_gpu_upload_texture_op_try (GskGpuFrame *frame,
|
||||
{
|
||||
GskGpuUploadTextureOp *self;
|
||||
GskGpuImage *image;
|
||||
GdkMemoryFormat format;
|
||||
|
||||
format = gdk_texture_get_format (texture);
|
||||
|
||||
image = gsk_gpu_device_create_upload_image (gsk_gpu_frame_get_device (frame),
|
||||
with_mipmap,
|
||||
gdk_texture_get_format (texture),
|
||||
format,
|
||||
gdk_memory_format_alpha (format) != GDK_MEMORY_ALPHA_PREMULTIPLIED &&
|
||||
gdk_color_state_get_no_srgb_tf (gdk_texture_get_color_state (texture)) != NULL,
|
||||
gdk_texture_get_width (texture),
|
||||
gdk_texture_get_height (texture));
|
||||
|
Loading…
Reference in New Issue
Block a user