clutter/color-state: Pass the ClutterContext when constructing

This will be used to cache pipeline snippets shared by multiple color
states.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3433>
This commit is contained in:
Jonas Ådahl
2024-05-10 14:57:52 +02:00
committed by Sebastian Wick
parent 4a07242fed
commit d7bbc9712f
5 changed files with 54 additions and 8 deletions

View File

@ -46,12 +46,14 @@ actor_color_state_default (void)
static void
actor_color_state_passed (void)
{
ClutterContext *context = clutter_test_get_context ();
ClutterActor *actor;
ClutterColorState *color_state;
ClutterColorspace colorspace;
ClutterTransferFunction transfer_function;
color_state = clutter_color_state_new (CLUTTER_COLORSPACE_BT2020,
color_state = clutter_color_state_new (context,
CLUTTER_COLORSPACE_BT2020,
CLUTTER_TRANSFER_FUNCTION_PQ);
if (!color_state)
@ -81,6 +83,7 @@ actor_color_state_passed (void)
static void
actor_change_color_state (void)
{
ClutterContext *context = clutter_test_get_context ();
ClutterActor *actor;
ClutterColorState *color_state;
ClutterColorspace colorspace;
@ -88,7 +91,8 @@ actor_change_color_state (void)
actor = clutter_actor_new ();
color_state = clutter_color_state_new (CLUTTER_COLORSPACE_BT2020,
color_state = clutter_color_state_new (context,
CLUTTER_COLORSPACE_BT2020,
CLUTTER_TRANSFER_FUNCTION_PQ);
if (!color_state)