clutter: Add color state pipeline capability enum
So far 'color-state' is added, intended to tag pipelines with color state transformation capabilities. Color state transformation snippets are tagged with it. Eventually handlers of pipelines will use this information to on-demand decorate pipelines with color transformation snippets. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3433>
This commit is contained in:
parent
f67ace517f
commit
15df584b7e
@ -835,6 +835,9 @@ clutter_color_state_get_transform_snippet (ClutterColorState *color_state,
|
||||
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_FRAGMENT,
|
||||
globals_source->str,
|
||||
snippet_source->str);
|
||||
cogl_snippet_set_capability (snippet,
|
||||
CLUTTER_PIPELINE_CAPABILITY,
|
||||
CLUTTER_PIPELINE_CAPABILITY_COLOR_STATE);
|
||||
g_hash_table_insert (snippet_cache,
|
||||
g_memdup2 (&cache_key, sizeof (cache_key)),
|
||||
g_object_ref (snippet));
|
||||
|
@ -53,6 +53,8 @@ typedef struct
|
||||
GDestroyNotify notify;
|
||||
} ClutterThreadsDispatch;
|
||||
|
||||
G_DEFINE_QUARK (clutter_pipeline_capability, clutter_pipeline_capability)
|
||||
|
||||
/* main context */
|
||||
static ClutterContext *ClutterCntx = NULL;
|
||||
|
||||
|
@ -90,6 +90,15 @@ typedef enum
|
||||
*/
|
||||
#define CLUTTER_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 50)
|
||||
|
||||
typedef enum _ClutterPipelineCapability
|
||||
{
|
||||
CLUTTER_PIPELINE_CAPABILITY_COLOR_STATE,
|
||||
} ClutterPipelineCapability;
|
||||
|
||||
#define CLUTTER_PIPELINE_CAPABILITY (clutter_pipeline_capability_quark ())
|
||||
CLUTTER_EXPORT
|
||||
GQuark clutter_pipeline_capability_quark (void);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_stage_handle_event (ClutterStage *stage,
|
||||
ClutterEvent *event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user