diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-08-02 22:00:50 -0400 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-10-18 11:49:11 +0100 |
commit | ff20a68ca3cc7c77968e3b11cefad368a1e4438c (patch) | |
tree | 6835a3d24060e8e062a9f189b0f012c96d8bda5b /gsk | |
parent | b876068e5b522200348e7b47d979025c62b60741 (diff) | |
download | gtk+-ff20a68ca3cc7c77968e3b11cefad368a1e4438c.tar.gz |
gsk: Split of debug spew for transforms
This was overwhelming other useful debug output, so make it
opt-in. We print the render items for both opengl and transforms,
since the matrices bleed into each other, otherwise.
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gskglrenderer.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c index 94095fc81a..de6b2c3d22 100644 --- a/gsk/gskglrenderer.c +++ b/gsk/gskglrenderer.c @@ -365,14 +365,16 @@ gsk_gl_renderer_update_frustum (GskGLRenderer *self, const graphene_matrix_t *modelview, const graphene_matrix_t *projection) { - GSK_NOTE (OPENGL, g_print ("Updating the modelview/projection\n")); + GSK_NOTE (TRANSFORMS, g_print ("Updating the modelview/projection\n")); graphene_matrix_multiply (projection, modelview, &self->mvp); graphene_frustum_init_from_matrix (&self->frustum, &self->mvp); - GSK_NOTE (OPENGL, g_print ("Renderer MVP:\n")); - GSK_NOTE (OPENGL, graphene_matrix_print (&self->mvp)); + GSK_NOTE (TRANSFORMS, + g_print ("Renderer MVP:\n"); + graphene_matrix_print (&self->mvp); + g_print ("\n")); } #define N_VERTICES 6 @@ -436,17 +438,18 @@ render_item (GskGLRenderer *self, glUniform1f (item->render_data.alpha_location, opacity); /* Pass the mvp to the vertex shader */ - GSK_NOTE (OPENGL, graphene_matrix_print (&item->mvp)); + GSK_NOTE (TRANSFORMS, graphene_matrix_print (&item->mvp)); graphene_matrix_to_float (&item->mvp, mvp); glUniformMatrix4fv (item->render_data.mvp_location, 1, GL_FALSE, mvp); /* Draw the quad */ - GSK_NOTE (OPENGL, g_print ("%*sDrawing item <%s>[%p] (w:%g, h:%g) with opacity: %g\n", - 2 * node_depth (item->node), "", - item->name, - item, - item->size.width, item->size.height, - item->opaque ? 1 : item->opacity)); + GSK_NOTE2 (OPENGL, TRANSFORMS, + g_print ("%*sDrawing item <%s>[%p] (w:%g, h:%g) with opacity: %g\n", + 2 * node_depth (item->node), "", + item->name, + item, + item->size.width, item->size.height, + item->opaque ? 1 : item->opacity)); glDrawArrays (GL_TRIANGLES, 0, N_VERTICES); @@ -491,17 +494,18 @@ render_item (GskGLRenderer *self, glUniform1f (item->render_data.alpha_location, item->opacity); /* Pass the mvp to the vertex shader */ - GSK_NOTE (OPENGL, graphene_matrix_print (&item->mvp)); + GSK_NOTE (TRANSFORMS, graphene_matrix_print (&item->mvp)); graphene_matrix_to_float (&item->mvp, mvp); glUniformMatrix4fv (item->render_data.mvp_location, 1, GL_FALSE, mvp); /* Draw the quad */ - GSK_NOTE (OPENGL, g_print ("%*sDrawing offscreen item <%s>[%p] (w:%g, h:%g) with opacity: %g\n", - 2 * node_depth (item->node), "", - item->name, - item, - item->size.width, item->size.height, - item->opacity)); + GSK_NOTE2 (OPENGL, TRANSFORMS, + g_print ("%*sDrawing offscreen item <%s>[%p] (w:%g, h:%g) with opacity: %g\n", + 2 * node_depth (item->node), "", + item->name, + item, + item->size.width, item->size.height, + item->opacity)); glDrawArrays (GL_TRIANGLES, 0, N_VERTICES); } |