mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
cogl debug: Adds glViewport call tracing
To aid in the debugging of Clutter stage resize issues this adds a COGL_DEBUG=opengl option that will trace "some select OpenGL calls" (currently just glViewport calls)
This commit is contained in:
parent
5751e48756
commit
f9fe4526eb
@ -48,6 +48,7 @@ static const GDebugKey cogl_log_debug_keys[] = {
|
||||
{ "batching", COGL_DEBUG_BATCHING },
|
||||
{ "matrices", COGL_DEBUG_MATRICES },
|
||||
{ "draw", COGL_DEBUG_DRAW },
|
||||
{ "opengl", COGL_DEBUG_OPENGL },
|
||||
{ "pango", COGL_DEBUG_PANGO },
|
||||
};
|
||||
static const int n_cogl_log_debug_keys =
|
||||
@ -114,6 +115,7 @@ _cogl_parse_debug_string (const char *value,
|
||||
OPT ("force-scanline-paths:", "use a scanline based path rasterizer");
|
||||
OPT ("dump-atlas-image:", "dump atlas changes to an image file");
|
||||
OPT ("disable-atlas:", "disable texture atlasing");
|
||||
OPT ("opengl:", "traces some select OpenGL calls");
|
||||
g_printerr ("\n%28s\n", "Special debug values:");
|
||||
OPT ("all:", "Enables all non-behavioural debug options");
|
||||
OPT ("verbose:", "Enables all non-behavioural debug options");
|
||||
|
@ -45,7 +45,8 @@ typedef enum {
|
||||
COGL_DEBUG_FORCE_SCANLINE_PATHS = 1 << 14,
|
||||
COGL_DEBUG_ATLAS = 1 << 15,
|
||||
COGL_DEBUG_DUMP_ATLAS_IMAGE = 1 << 16,
|
||||
COGL_DEBUG_DISABLE_ATLAS = 1 << 17
|
||||
COGL_DEBUG_DISABLE_ATLAS = 1 << 17,
|
||||
COGL_DEBUG_OPENGL = 1 << 18
|
||||
} CoglDebugFlags;
|
||||
|
||||
#ifdef COGL_ENABLE_DEBUG
|
||||
|
@ -681,6 +681,12 @@ _cogl_framebuffer_flush_state (CoglHandle handle,
|
||||
gl_viewport_y = framebuffer->height -
|
||||
(framebuffer->viewport_y + framebuffer->viewport_height);
|
||||
|
||||
COGL_NOTE (OPENGL, "Calling glViewport(%d, %d, %d, %d)",
|
||||
framebuffer->viewport_x,
|
||||
gl_viewport_y,
|
||||
framebuffer->viewport_width,
|
||||
framebuffer->viewport_height);
|
||||
|
||||
GE (glViewport (framebuffer->viewport_x,
|
||||
gl_viewport_y,
|
||||
framebuffer->viewport_width,
|
||||
|
Loading…
Reference in New Issue
Block a user