cogl: Pass Context to cogl_flush

Avoids using the global variable & also move the function to
it proper context

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3857>
This commit is contained in:
Bilal Elmoussaoui
2024-06-29 15:20:14 +02:00
committed by Marge Bot
parent 194fa80cdd
commit b3ae934304
8 changed files with 47 additions and 42 deletions

View File

@ -211,7 +211,7 @@ validate_result (TestState *state)
/* Sub sub texture */
p = texture_data = g_malloc (10 * 10 * 4);
cogl_flush ();
cogl_context_flush (cogl_framebuffer_get_context (test_fb));
cogl_framebuffer_read_pixels (test_fb,
0, SOURCE_SIZE * 2, 10, 10,
COGL_PIXEL_FORMAT_RGBA_8888,