diff options
author | Benjamin Otte <otte@redhat.com> | 2023-04-03 19:26:36 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2023-04-03 19:27:58 +0200 |
commit | 8136b7380278aeb51c9eb103ff5f0bcc31d1cf85 (patch) | |
tree | 143ca0b6671f85f98c132230ede8b9fbe95d1931 | |
parent | 6d345f0d01ccca74d0a4234b50114bd3969f5715 (diff) | |
download | gtk+-wip/otte/rendernode-opaque.tar.gz |
Print some bounds of opaque regionswip/otte/rendernode-opaque
-rw-r--r-- | gdk/gdksurface.c | 9 | ||||
-rw-r--r-- | gsk/gl/gskglrenderer.c | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 7120da78db..469f37a9ed 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2707,6 +2707,15 @@ gdk_surface_set_opaque_region (GdkSurface *surface, if (region != NULL) surface->opaque_region = cairo_region_reference (region); + if (!region) + g_print (">>> no opaque region\n"); + else + { + GdkRectangle opaque; + cairo_region_get_extents (region, &opaque); + g_print (">>> opaque region: %d %d %d %d (%d)\n", opaque.x, opaque.y, opaque.width, opaque.height, cairo_region_num_rectangles (region)); + } + class = GDK_SURFACE_GET_CLASS (surface); if (class->set_opaque_region) class->set_opaque_region (surface, region); diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index 8451ad9563..bb43605e32 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -319,6 +319,15 @@ gsk_gl_renderer_render (GskRenderer *renderer, gsk_gl_driver_after_frame (self->driver); + { + graphene_rect_t opaque; + + if (!gsk_render_node_get_opaque (root, &opaque)) + g_print ("no opaque region\n"); + else + g_print ("opaque region: %g %g %g %g\n", opaque.origin.x, opaque.origin.y, opaque.size.width, opaque.size.height); + } + cairo_region_destroy (render_region); } |