1
0
Fork 0

Set names of various Cogl pipelines

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3433>
This commit is contained in:
Jonas Ådahl 2024-06-07 22:54:22 +02:00 committed by Sebastian Wick
parent 6cd28a84ac
commit aaba08e5aa
13 changed files with 25 additions and 1 deletions

View file

@ -171,6 +171,8 @@ clutter_blur_effect_init (ClutterBlurEffect *self)
clutter_backend_get_cogl_context (clutter_get_default_backend ());
klass->base_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (klass->base_pipeline,
"ClutterBlurEffect (base pipeline)");
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_TEXTURE_LOOKUP,
box_blur_glsl_declarations,

View file

@ -150,6 +150,7 @@ create_blur_pipeline (void)
CoglSnippet *snippet;
blur_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (blur_pipeline, "ClutterBlur");
cogl_pipeline_set_layer_null_texture (blur_pipeline, 0);
cogl_pipeline_set_layer_filters (blur_pipeline,
0,

View file

@ -374,6 +374,8 @@ clutter_brightness_contrast_effect_init (ClutterBrightnessContrastEffect *self)
clutter_backend_get_cogl_context (clutter_get_default_backend ());
klass->base_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (klass->base_pipeline,
"ClutterBrightnessContrast");
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_FRAGMENT,
brightness_contrast_decls,

View file

@ -214,6 +214,7 @@ clutter_colorize_effect_init (ClutterColorizeEffect *self)
clutter_backend_get_cogl_context (clutter_get_default_backend ());
klass->base_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (klass->base_pipeline, "ClutterColorize");
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_FRAGMENT,
colorize_glsl_declarations,

View file

@ -218,6 +218,7 @@ clutter_desaturate_effect_init (ClutterDesaturateEffect *self)
CoglSnippet *snippet;
klass->base_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (klass->base_pipeline, "ClutterDesaturate");
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_FRAGMENT,
desaturate_glsl_declarations,

View file

@ -398,6 +398,9 @@ clutter_pipeline_node_draw (ClutterPaintNode *node,
if (node->operations == NULL)
return;
if (!cogl_pipeline_get_name (pnode->pipeline))
cogl_pipeline_set_static_name (pnode->pipeline, node->name);
fb = clutter_paint_context_get_framebuffer (paint_context);
for (i = 0; i < node->operations->len; i++)

View file

@ -170,6 +170,7 @@ clutter_stage_view_create_offscreen_pipeline (CoglOffscreen *offscreen)
CoglPipeline *pipeline;
pipeline = cogl_pipeline_new (cogl_framebuffer_get_context (framebuffer));
cogl_pipeline_set_static_name (pipeline, "ClutterStageView (offscreen)");
cogl_pipeline_set_layer_filters (pipeline, 0,
COGL_PIPELINE_FILTER_NEAREST,

View file

@ -1886,6 +1886,7 @@ create_color_pipeline (void)
if (G_UNLIKELY (color_pipeline == NULL))
{
color_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (color_pipeline, "ClutterText (color)");
cogl_context_set_named_pipeline (ctx,
&color_pipeline_key,
color_pipeline);

View file

@ -108,6 +108,7 @@ get_base_texture_rgba_pipeline (CoglPangoPipelineCache *cache)
pipeline = cache->base_texture_rgba_pipeline =
cogl_pipeline_new (cache->ctx);
cogl_pipeline_set_static_name (pipeline, "CoglPango (texture rgba)");
cogl_pipeline_set_layer_wrap_mode (pipeline, 0,
COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
@ -130,6 +131,7 @@ get_base_texture_alpha_pipeline (CoglPangoPipelineCache *cache)
CoglPipeline *pipeline;
pipeline = cogl_pipeline_copy (get_base_texture_rgba_pipeline (cache));
cogl_pipeline_set_static_name (pipeline, "CoglPango (texture alpha)");
cache->base_texture_alpha_pipeline = pipeline;
/* The default combine mode of materials is to modulate (A x B)
@ -205,6 +207,7 @@ _cogl_pango_pipeline_cache_get (CoglPangoPipelineCache *cache,
{
entry->texture = NULL;
entry->pipeline = cogl_pipeline_new (cache->ctx);
cogl_pipeline_set_static_name (entry->pipeline, "CoglPango (list entry)");
}
/* Add a weak reference to the pipeline so we can remove it from the

View file

@ -83,6 +83,7 @@ _cogl_blit_texture_render_begin (CoglBlitData *data)
if (ctx->blit_texture_pipeline == NULL)
{
ctx->blit_texture_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (ctx->blit_texture_pipeline, "CoglBlit");
cogl_pipeline_set_layer_filters (ctx->blit_texture_pipeline, 0,
COGL_PIPELINE_FILTER_NEAREST,

View file

@ -312,6 +312,8 @@ cogl_context_new (CoglDisplay *display,
graphene_matrix_scale (&context->y_flip_matrix, 1, -1, 1);
context->opaque_color_pipeline = cogl_pipeline_new (context);
cogl_pipeline_set_static_name (context->opaque_color_pipeline,
"CoglContext (opaque color)");
context->codegen_header_buffer = g_string_new ("");
context->codegen_source_buffer = g_string_new ("");
@ -364,6 +366,8 @@ cogl_context_new (CoglDisplay *display,
context->current_buffer[i] = NULL;
context->stencil_pipeline = cogl_pipeline_new (context);
cogl_pipeline_set_static_name (context->stencil_pipeline,
"Cogl (stencil)");
context->rectangle_byte_indices = NULL;
context->rectangle_short_indices = NULL;

View file

@ -348,7 +348,10 @@ _cogl_journal_flush_modelview_and_entries (CoglJournalEntry *batch_start,
CoglColor color;
if (outline == NULL)
outline = cogl_pipeline_new (ctx);
{
outline = cogl_pipeline_new (ctx);
cogl_pipeline_set_static_name (outline, "CoglJournal (outline)");
}
/* The least significant three bits represent the three
components so that the order of colours goes red, green,

View file

@ -954,6 +954,7 @@ make_shadow (MetaShadow *shadow,
g_free (buffer);
shadow->pipeline = meta_create_texture_pipeline (shadow->texture);
cogl_pipeline_set_static_name (shadow->pipeline, "MetaShadowFactory");
}
static MetaShadowParams *