Merge branch 'matthiasc/for-main' into 'main'
colorstate: Avoid a memcpy See merge request GNOME/gtk!7599
This commit is contained in:
@@ -449,7 +449,6 @@ TRANSFORM(gdk_cicp_from_rec2100_linear, NONE, cicp->from_rec2020, cicp->o
|
||||
|
||||
#undef cicp
|
||||
|
||||
/* }}} */
|
||||
/* }}} */
|
||||
/* {{{ Vfuncs */
|
||||
|
||||
|
||||
@@ -176,7 +176,10 @@ gdk_color_state_convert_color (GdkColorState *src_cs,
|
||||
GdkFloatColorConvert convert = NULL;
|
||||
GdkFloatColorConvert convert2 = NULL;
|
||||
|
||||
memcpy (dest, src, sizeof (float) * 4);
|
||||
dest[0] = src[0];
|
||||
dest[1] = src[1];
|
||||
dest[2] = src[2];
|
||||
dest[3] = src[3];
|
||||
|
||||
if (gdk_color_state_equal (src_cs, dest_cs))
|
||||
return;
|
||||
|
||||
@@ -74,6 +74,10 @@ gsk_gpu_color_states_is_alt_premultiplied (GskGpuColorStates self)
|
||||
return !!(self & COLOR_SPACE_ALT_PREMULTIPLIED);
|
||||
}
|
||||
|
||||
/* Note: this function should only return a colorstate other than
|
||||
* color->color_state *only* if the shaders can't handle the conversion
|
||||
* from color->color_state to ccs.
|
||||
*/
|
||||
static inline GdkColorState *
|
||||
gsk_gpu_color_states_find (GdkColorState *ccs,
|
||||
const GdkColor *color)
|
||||
|
||||
Reference in New Issue
Block a user