Adapt to exposed CoglSnippetHook

It was exposed few cycles back, so get rid of the duplicated type.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3519>
This commit is contained in:
Bilal Elmoussaoui
2024-10-21 10:25:33 +02:00
parent e091cccec8
commit fd8d923a34
4 changed files with 9 additions and 29 deletions

View File

@ -50,7 +50,7 @@ shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
*/
void
shell_glsl_effect_add_glsl_snippet (ShellGLSLEffect *effect,
ShellSnippetHook hook,
CoglSnippetHook hook,
const char *declarations,
const char *code,
gboolean is_replace)
@ -62,16 +62,16 @@ shell_glsl_effect_add_glsl_snippet (ShellGLSLEffect *effect,
if (is_replace)
{
snippet = cogl_snippet_new ((CoglSnippetHook)hook, declarations, NULL);
snippet = cogl_snippet_new (hook, declarations, NULL);
cogl_snippet_set_replace (snippet, code);
}
else
{
snippet = cogl_snippet_new ((CoglSnippetHook)hook, declarations, code);
snippet = cogl_snippet_new (hook, declarations, code);
}
if (hook == SHELL_SNIPPET_HOOK_VERTEX ||
hook == SHELL_SNIPPET_HOOK_FRAGMENT)
if (hook == COGL_SNIPPET_HOOK_VERTEX ||
hook == COGL_SNIPPET_HOOK_FRAGMENT)
cogl_pipeline_add_snippet (klass->base_pipeline, snippet);
else
cogl_pipeline_add_layer_snippet (klass->base_pipeline, 0, snippet);