snapshot: Redo debug messages
authorBenjamin Otte <otte@redhat.com>
Tue, 24 Apr 2018 01:17:23 +0000 (03:17 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 24 Apr 2018 02:06:58 +0000 (04:06 +0200)
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.

67 files changed:
demos/gtk-demo/fontplane.c
demos/gtk-demo/paint.c
demos/gtk-demo/paintable.c
gdk/gdkpaintable.c
gdk/gdktexture.c
gtk/gskpango.c
gtk/gtkcalendar.c
gtk/gtkcellrenderer.c
gtk/gtkcellrendererprogress.c
gtk/gtkcellrendererspinner.c
gtk/gtkcellrenderertext.c
gtk/gtkcellrenderertoggle.c
gtk/gtkcolorbutton.c
gtk/gtkcolorplane.c
gtk/gtkcolorscale.c
gtk/gtkcolorswatch.c
gtk/gtkcssfiltervalue.c
gtk/gtkcssimage.c
gtk/gtkcssimagebuiltin.c
gtk/gtkcssimagecrossfade.c
gtk/gtkcssimagefallback.c
gtk/gtkcssimageicontheme.c
gtk/gtkcssimagelinear.c
gtk/gtkcssimageradial.c
gtk/gtkcssimagerecolor.c
gtk/gtkcssimagewin32.c
gtk/gtkcssshadowsvalue.c
gtk/gtkcssshadowvalue.c
gtk/gtkdrawingarea.c
gtk/gtkentry.c
gtk/gtkflowbox.c
gtk/gtkglarea.c
gtk/gtkiconview.c
gtk/gtklabel.c
gtk/gtkmagnifier.c
gtk/gtkmenu.c
gtk/gtkoverlay.c
gtk/gtkpaned.c
gtk/gtkpopover.c
gtk/gtkrenderbackground.c
gtk/gtkrenderborder.c
gtk/gtkrendericon.c
gtk/gtkrendernodepaintable.c
gtk/gtkrevealer.c
gtk/gtkscaler.c
gtk/gtksnapshot.c
gtk/gtksnapshot.h
gtk/gtksnapshotprivate.h
gtk/gtkstack.c
gtk/gtkstylecontext.c
gtk/gtktextutil.c
gtk/gtktextview.c
gtk/gtktreeview.c
gtk/gtkviewport.c
gtk/gtkwidget.c
gtk/gtkwidgetpaintable.c
gtk/inspector/cellrenderergraph.c
gtk/inspector/fpsoverlay.c
gtk/inspector/highlightoverlay.c
gtk/inspector/inspectoroverlay.c
gtk/inspector/rendernodeview.c
gtk/inspector/updatesoverlay.c
gtk/inspector/window.c
tests/showrendernode.c
tests/testblur.c
tests/testtexture.c
tests/testwidgetfocus.c

index 6df1bfe7f72ac567e8b5ecf9d48e9e0029cd16a5..ce81ecce9591d8cce2802fb6bbe37c4018b8b211 100644 (file)
@@ -68,8 +68,7 @@ plane_snapshot (GtkWidget   *widget,
   height = gtk_widget_get_allocated_height (widget);
 
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                  "FontPlane");
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height));
 
   cairo_set_source_rgb (cr, 0, 0, 0);
   cairo_rectangle (cr, 0, 0, width, height);
index c4c9ae0caa8d4711fc5612eae1f21836d93f840f..a451a677c811619e0ced789d6e69e23410fba053 100644 (file)
@@ -102,8 +102,7 @@ drawing_area_snapshot (GtkWidget   *widget,
                                     0, 0,
                                    allocation.width,
                                    allocation.height
-                                  ),
-                                  "DrawingArea");
+                                  ));
 
   cairo_set_source_rgb (cr, 1, 1, 1);
   cairo_paint (cr);
index da7e22d20825e619c51e0a0005c1703803b4c837..3d20e99984690fb0fd842716cdc50e0beff78921 100644 (file)
@@ -56,15 +56,13 @@ gtk_nuclear_snapshot (GtkSnapshot *snapshot,
 
   gtk_snapshot_append_color (snapshot,
                              &(GdkRGBA) { 0.9, 0.75, 0.15, 1.0 },
-                             &GRAPHENE_RECT_INIT (0, 0, width, height),
-                             "Yellow background");
+                             &GRAPHENE_RECT_INIT (0, 0, width, height));
 
   size = MIN (width, height);
   cr = gtk_snapshot_append_cairo (snapshot,
                                   &GRAPHENE_RECT_INIT ((width - size) / 2.0,
                                                        (height - size) / 2.0,
-                                                       size, size),
-                                  "Radioactive Icon");
+                                                       size, size));
   cairo_translate (cr, width / 2.0, height / 2.0);
   cairo_scale (cr, size, size);
   cairo_rotate (cr, rotation);
index efb4ea2ac37f03740dd3f22d811c0dea5d33670a..24ee62225aa7f6140a1dd4ea0e0ae2beb146901f 100644 (file)
 
 #include "gdksnapshotprivate.h"
 
+/* HACK: So we don't need to include any (not-yet-created) GSK or GTK headers */
+void            gtk_snapshot_push_debug                 (GdkSnapshot            *snapshot,
+                                                         const char             *message,
+                                                         ...) G_GNUC_PRINTF (2, 3);
+void            gtk_snapshot_pop                        (GdkSnapshot            *snapshot);
+
 /**
  * SECTION:paintable
  * @Title: GdkPaintable
@@ -206,8 +212,12 @@ gdk_paintable_snapshot (GdkPaintable *paintable,
   if (width <= 0.0 || height <= 0.0)
     return;
 
+  gtk_snapshot_push_debug (snapshot, "%s %p @ %gx%g", G_OBJECT_TYPE_NAME (paintable), paintable, width, height);
+
   iface = GDK_PAINTABLE_GET_IFACE (paintable);
   iface->snapshot (paintable, snapshot, width, height);
+
+  gtk_snapshot_pop (snapshot);
 }
 
 #define GDK_PAINTABLE_IMMUTABLE (GDK_PAINTABLE_STATIC_SIZE | GDK_PAINTABLE_STATIC_CONTENTS)
index 3e5f0a401a624ad750f4465b3b335417200b4051..73c7f85dbf5e02e32adee2c94903984fc6bf85d3 100644 (file)
@@ -47,9 +47,7 @@
 void
 gtk_snapshot_append_texture (GdkSnapshot            *snapshot,
                              GdkTexture             *texture,
-                             const graphene_rect_t  *bounds,
-                             const char             *name,
-                             ...) G_GNUC_PRINTF (4, 5);
+                             const graphene_rect_t  *bounds);
 
 /**
  * SECTION:gdktexture
@@ -93,10 +91,7 @@ gdk_texture_paintable_snapshot (GdkPaintable *paintable,
 
   gtk_snapshot_append_texture (snapshot,
                                self,
-                               &GRAPHENE_RECT_INIT (0, 0, width, height),
-                               "%s as paintable %dx%d",
-                               G_OBJECT_TYPE_NAME (paintable),
-                               self->width, self->height);
+                               &GRAPHENE_RECT_INIT (0, 0, width, height));
 }
 
 static GdkPaintableFlags
index a486b81add47078572d6aa8f5337cf970995d8a2..20bff5e9c2754fc7fbbcdd9e4c7f06153eae6ebb 100644 (file)
@@ -46,7 +46,6 @@ struct _GskPangoRenderer
   GtkSnapshot *snapshot;
   GdkRGBA fg_color;
   graphene_rect_t bounds;
-  char *name;
 
   /* house-keeping options */
   gboolean is_cached_renderer;
@@ -147,13 +146,6 @@ gsk_pango_renderer_show_text_glyphs (PangoRenderer        *renderer,
   if (node == NULL)
     return;
 
-  if (gtk_snapshot_get_record_names (crenderer->snapshot))
-    {
-      char *s = g_strdup_printf ("%s<%d>", crenderer->name, glyphs->num_glyphs);
-      gsk_render_node_set_name (node, s);
-      g_free (s);
-    }
-
   gtk_snapshot_append_node_internal (crenderer->snapshot, node);
   gsk_render_node_unref (node);
 }
@@ -199,7 +191,7 @@ gsk_pango_renderer_draw_rectangle (PangoRenderer     *renderer,
                       (double)x / PANGO_SCALE, (double)y / PANGO_SCALE,
                       (double)width / PANGO_SCALE, (double)height / PANGO_SCALE);
 
-  gtk_snapshot_append_color (crenderer->snapshot, &rgba, &bounds, "DrawRectangle");
+  gtk_snapshot_append_color (crenderer->snapshot, &rgba, &bounds);
 }
 
 static void
@@ -216,7 +208,7 @@ gsk_pango_renderer_draw_trapezoid (PangoRenderer   *renderer,
   cairo_t *cr;
   gdouble x, y;
 
-  cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds, "DrawTrapezoid");
+  cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds);
 
   set_color (crenderer, part, cr);
 
@@ -319,7 +311,7 @@ gsk_pango_renderer_draw_error_underline (PangoRenderer *renderer,
   GskPangoRenderer *crenderer = (GskPangoRenderer *) (renderer);
   cairo_t *cr;
 
-  cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds, "DrawTrapezoid");
+  cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds);
 
   set_color (crenderer, PANGO_RENDER_PART_UNDERLINE, cr);
 
@@ -348,7 +340,7 @@ gsk_pango_renderer_draw_shape (PangoRenderer  *renderer,
   double base_x = (double)x / PANGO_SCALE;
   double base_y = (double)y / PANGO_SCALE;
 
-  cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds, "DrawShape");
+  cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds);
 
   layout = pango_renderer_get_layout (renderer);
   if (!layout)
@@ -419,7 +411,6 @@ release_renderer (GskPangoRenderer *renderer)
   if (G_LIKELY (renderer->is_cached_renderer))
     {
       renderer->snapshot = NULL;
-      g_clear_pointer (&renderer->name, g_free);
 
       G_UNLOCK (cached_renderer);
     }
@@ -432,19 +423,15 @@ release_renderer (GskPangoRenderer *renderer)
  * @snapshot: a #GtkSnapshot
  * @layout: the #PangoLayout to render
  * @color: the foreground color to render the layout in
- * @name: (transfer none): a printf() style format string for the name for the new node
- * @...: arguments to insert into the format string
  *
  * Creates render nodes for rendering @layout in the given foregound @color
  * and appends them to the current node of @snapshot without changing the
  * current node.
  **/
 void
-gtk_snapshot_append_layout (GtkSnapshot            *snapshot,
-                            PangoLayout            *layout,
-                            const GdkRGBA          *color,
-                            const char             *name,
-                            ...)
+gtk_snapshot_append_layout (GtkSnapshot   *snapshot,
+                            PangoLayout   *layout,
+                            const GdkRGBA *color)
 {
   GskPangoRenderer *crenderer;
   PangoRectangle ink_rect;
@@ -456,16 +443,6 @@ gtk_snapshot_append_layout (GtkSnapshot            *snapshot,
 
   crenderer->snapshot = snapshot;
   crenderer->fg_color = *color;
-  if (name && gtk_snapshot_get_record_names (crenderer->snapshot))
-    {
-      va_list args;
-
-      va_start (args, name);
-      crenderer->name = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    crenderer->name = NULL;
 
   pango_layout_get_pixel_extents (layout, &ink_rect, NULL);
   graphene_rect_init (&crenderer->bounds, ink_rect.x, ink_rect.y, ink_rect.width, ink_rect.height);
index 643bbf9ddb9e4cbb7cb0d81b8bbca647fe6cd5e8..219be68481f18ace40dfaa6bcb9e9803ef819e20 100644 (file)
@@ -2325,8 +2325,7 @@ calendar_snapshot_day (GtkCalendar *calendar,
                                  &GRAPHENE_RECT_INIT (
                                      day_rect.x + 2, y_loc,
                                      day_rect.width - 2, 1
-                                 ),
-                                 "CalendarDetailSeparator");
+                                 ));
 
       y_loc += 2;
     }
index 9bbfd4a3ec88c84f6afc23912f597bffe6b4e5d7..7c176b020c475a8bac5097bc6f1a3ab72d1e1d46 100644 (file)
@@ -707,6 +707,8 @@ gtk_cell_renderer_snapshot (GtkCellRenderer      *cell,
 
   selected = (flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED;
 
+  gtk_snapshot_push_debug (snapshot, "%s", G_OBJECT_TYPE_NAME (cell));
+
   if (priv->cell_background_set && !selected)
     {
       gtk_snapshot_append_color (snapshot,
@@ -714,16 +716,14 @@ gtk_cell_renderer_snapshot (GtkCellRenderer      *cell,
                                  &GRAPHENE_RECT_INIT (
                                      background_area->x, background_area->y,
                                      background_area->width, background_area->height
-                                 ),
-                                 "CellBackground");
+                                 ));
     }
 
   gtk_snapshot_push_clip (snapshot,
                           &GRAPHENE_RECT_INIT (
                               background_area->x, background_area->y,
                               background_area->width, background_area->height
-                          ),
-                          "CellClip");
+                          ));
 
   context = gtk_widget_get_style_context (widget);
 
@@ -741,6 +741,7 @@ gtk_cell_renderer_snapshot (GtkCellRenderer      *cell,
                                                 flags);
   gtk_style_context_restore (context);
   gtk_snapshot_pop (snapshot);
+  gtk_snapshot_pop (snapshot);
 }
 
 /**
index ebacb72c6adb1675823366990a00b130167cfd12..43f4b138b62bae30e88da6349716bf38c939cf67 100644 (file)
@@ -648,8 +648,7 @@ gtk_cell_renderer_progress_snapshot (GtkCellRenderer      *cell,
                               &GRAPHENE_RECT_INIT(
                                   clip.x, clip.y,
                                   clip.width, clip.height
-                              ),
-                              "CellProgressClip");
+                              ));
 
       gtk_style_context_save (context);
       gtk_style_context_add_class (context, GTK_STYLE_CLASS_PROGRESSBAR);
@@ -681,8 +680,7 @@ gtk_cell_renderer_progress_snapshot (GtkCellRenderer      *cell,
                                   &GRAPHENE_RECT_INIT(
                                       clip.x, clip.y,
                                       clip.width, clip.height
-                                  ),
-                                  "CellTroughClip");
+                                  ));
 
           gtk_snapshot_render_layout (snapshot, context,
                                       x_pos, y_pos,
@@ -708,8 +706,7 @@ gtk_cell_renderer_progress_snapshot (GtkCellRenderer      *cell,
                                   &GRAPHENE_RECT_INIT(
                                       clip.x, clip.y,
                                       clip.width, clip.height
-                                  ),
-                                  "CellTroughClip");
+                                  ));
 
           gtk_snapshot_render_layout (snapshot, context,
                                       x_pos, y_pos,
index d14cdd2591920b40689f067b05505c94d0e32c54..e68ec047bdfa72e0ad3ce7ebde8272f98cb369e8 100644 (file)
@@ -418,8 +418,7 @@ gtk_cell_renderer_spinner_snapshot (GtkCellRenderer      *cellr,
                                   &GRAPHENE_RECT_INIT (
                                       cell_area->x, cell_area->y,
                                       cell_area->width, cell_area->height
-                                  ),
-                                  "CellSpinner");
+                                  ));
 
   gtk_paint_spinner (gtk_widget_get_style_context (widget),
                      cr,
index 58c736740750c9cd97face8c54e92576df2e96f3..1e46ea0c56406d22533fe1ca47f57229c9e085c7 100644 (file)
@@ -1730,8 +1730,7 @@ gtk_cell_renderer_text_snapshot (GtkCellRenderer      *cell,
                                  &GRAPHENE_RECT_INIT(
                                      background_area->x, background_area->y,
                                      background_area->width, background_area->height
-                                 ),
-                                 "CellTextBackground");
+                                 ));
     }
 
   gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
@@ -1749,8 +1748,7 @@ gtk_cell_renderer_text_snapshot (GtkCellRenderer      *cell,
                           &GRAPHENE_RECT_INIT(
                               cell_area->x, cell_area->y,
                               cell_area->width, cell_area->height
-                          ),
-                          "CellTextClip");
+                          ));
 
   gtk_snapshot_render_layout (snapshot, context,
                               cell_area->x + x_offset + xpad,
index 4f7225e369421fd78966bd7f650ac3a401ddca6c..f899f736e1d28ce4f99fb5612b107502c706ba20 100644 (file)
@@ -423,8 +423,7 @@ gtk_cell_renderer_toggle_snapshot (GtkCellRenderer      *cell,
                           &GRAPHENE_RECT_INIT (
                              cell_area->x, cell_area->y,
                              cell_area->width, cell_area->height
-                          ),
-                          "CellToggleClip");
+                          ));
 
   context = gtk_cell_renderer_toggle_save_context (cell, widget);
   gtk_style_context_set_state (context, state);
index d5338664347b8ed219dfe8a43738cae1fb18a79d..7bb6972a4acc79a90303c51d389cf779ce74044d 100644 (file)
@@ -325,11 +325,10 @@ set_color_icon (GdkDragContext *context,
   GtkSnapshot *snapshot;
   GdkPaintable *paintable;
 
-  snapshot = gtk_snapshot_new (FALSE, "ColorDragIcon");
+  snapshot = gtk_snapshot_new ();
   gtk_snapshot_append_color (snapshot,
                              rgba,
-                             &GRAPHENE_RECT_INIT(0, 0, 48, 32),
-                             "ColorDragColor");
+                             &GRAPHENE_RECT_INIT(0, 0, 48, 32));
   paintable = gtk_snapshot_free_to_paintable (snapshot, NULL);
 
   gtk_drag_set_icon_paintable (context, paintable, 0, 0);
index c45adc2ba1aff4cd92bbfaecd4f5b50430fa115e..7162d7ebdfb23338cce94a817c989f76c54e244b 100644 (file)
@@ -84,11 +84,9 @@ plane_snapshot (GtkWidget   *widget,
 
   gtk_snapshot_append_texture (snapshot,
                                plane->priv->texture,
-                               &GRAPHENE_RECT_INIT (0, 0, width, height),
-                               "ColorPlane");
+                               &GRAPHENE_RECT_INIT (0, 0, width, height));
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                  "ColorPlane");
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height));
 
   cairo_move_to (cr, 0,     y + 0.5);
   cairo_line_to (cr, width, y + 0.5);
index 4f473084a4c2127bef1e964774395126531a41bb..1556259e0814e829a44358b5b162f963935e8faf 100644 (file)
@@ -103,8 +103,7 @@ gtk_color_scale_snapshot_trough (GtkColorScale  *scale,
 
       gtk_snapshot_append_texture (snapshot,
                                    texture,
-                                   &GRAPHENE_RECT_INIT(x, y, width, height),
-                                   "ColorScaleHue");
+                                   &GRAPHENE_RECT_INIT(x, y, width, height));
       g_object_unref (texture);
     }
   else if (scale->priv->type == GTK_COLOR_SCALE_ALPHA)
@@ -113,8 +112,7 @@ gtk_color_scale_snapshot_trough (GtkColorScale  *scale,
       graphene_point_t start, end;
 
       cr = gtk_snapshot_append_cairo (snapshot,
-                                      &GRAPHENE_RECT_INIT(x, y, width, height),
-                                      "ColorScaleAlpha");
+                                      &GRAPHENE_RECT_INIT(x, y, width, height));
       cairo_translate (cr, x, y);
 
       if (gtk_orientable_get_orientation (GTK_ORIENTABLE (widget)) == GTK_ORIENTATION_HORIZONTAL &&
@@ -157,8 +155,7 @@ gtk_color_scale_snapshot_trough (GtkColorScale  *scale,
                                                { 0, { color->red, color->green, color->blue, 0 } },
                                                { 1, { color->red, color->green, color->blue, 1 } },
                                            },
-                                           2,
-                                           "ColorAlphaGradient");
+                                           2);
     }
 }
 
index 44a04c685b0a188db8a683822cbba2367e10882b..7ce4eff6737c3c6c364e9794bbd75744b10a52a4 100644 (file)
@@ -117,17 +117,13 @@ swatch_snapshot (GtkWidget   *widget,
                                         0, 0,
                                         gtk_widget_get_width (widget),
                                         gtk_widget_get_height (widget));
-      gtk_snapshot_push_rounded_clip (snapshot,
-                                      &content_box,
-                                      "ColorSwatchClip");
+      gtk_snapshot_push_rounded_clip (snapshot, &content_box);
 
       if (swatch->priv->use_alpha && !gdk_rgba_is_opaque (&swatch->priv->color))
         {
           cairo_t *cr;
 
-          cr = gtk_snapshot_append_cairo (snapshot,
-                                          &content_box.bounds,
-                                          "CheckeredBackground");
+          cr = gtk_snapshot_append_cairo (snapshot, &content_box.bounds);
           cairo_set_source_rgb (cr, 0.33, 0.33, 0.33);
           cairo_paint (cr);
 
@@ -143,8 +139,7 @@ swatch_snapshot (GtkWidget   *widget,
 
           gtk_snapshot_append_color (snapshot,
                                      &swatch->priv->color,
-                                     &content_box.bounds,
-                                     "ColorSwatch Color");
+                                     &content_box.bounds);
         }
       else
         {
@@ -154,8 +149,7 @@ swatch_snapshot (GtkWidget   *widget,
 
           gtk_snapshot_append_color (snapshot,
                                      &color,
-                                     &content_box.bounds,
-                                     "ColorSwatch Opaque Color");
+                                     &content_box.bounds);
         }
 
       gtk_snapshot_pop (snapshot);
@@ -172,11 +166,10 @@ drag_set_color_icon (GdkDragContext *context,
   GtkSnapshot *snapshot;
   GdkPaintable *paintable;
 
-  snapshot = gtk_snapshot_new (FALSE, "ColorDragIcon");
+  snapshot = gtk_snapshot_new ();
   gtk_snapshot_append_color (snapshot,
                              color,
-                             &GRAPHENE_RECT_INIT(0, 0, 48, 32),
-                             "ColorDragColor");
+                             &GRAPHENE_RECT_INIT(0, 0, 48, 32));
   paintable = gtk_snapshot_free_to_paintable (snapshot, NULL);
 
   gtk_drag_set_icon_paintable (context, paintable, 4, 4);
index 4f73e239a7f23279f3bce87c38f459a664313385..eaf79de37ce961d5057ab638335a8a20e3aacc2a 100644 (file)
@@ -875,15 +875,14 @@ gtk_css_filter_value_push_snapshot (const GtkCssValue *filter,
       if (i < j)
         gtk_snapshot_push_color_matrix (snapshot,
                                         &matrix,
-                                        &offset,
-                                        "CssFilter ColorMatrix<%d-%d>", i, j);
+                                        &offset);
 
       if (j < filter->n_filters)
         {
           if (filter->filters[j].type == GTK_CSS_FILTER_BLUR)
             {
               radius = _gtk_css_number_value_get (filter->filters[j].blur.value, 100.0);
-              gtk_snapshot_push_blur (snapshot, radius, "CssFilter Blur<%d, radius %g>", j, radius);
+              gtk_snapshot_push_blur (snapshot, radius);
             }
           else
             g_warning ("Don't know how to handle filter type %d", filter->filters[j].type);
index 842893eec28cec26e6cf4bc75375e703b17b65d6..90919b0109383f4555a1dc22f3fdbcb7af592eec 100644 (file)
@@ -251,7 +251,7 @@ _gtk_css_image_draw (GtkCssImage        *image,
 
   cairo_save (cr);
 
-  snapshot = gtk_snapshot_new (FALSE, "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
+  snapshot = gtk_snapshot_new ();
   gtk_css_image_snapshot (image, snapshot, width, height);
   node = gtk_snapshot_free_to_node (snapshot);
 
index aedc2e8ff52af2656277bd828af05e9a1cb721be..ee547f6c90ec8fbb8c4292bd49f613c22e33d282 100644 (file)
@@ -663,8 +663,7 @@ gtk_css_image_builtin_snapshot (GtkCssImage            *image,
     }
 
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                  "BuiltinImage<%d>", (int) image_type);
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height));
   gtk_css_image_builtin_draw (image, cr, width, height, image_type);
   cairo_destroy (cr);
 }
index 918ab2cae7302a45f40b98b31ea92405353f6af6..83dfd991a8daa4f2d6f29b2addfdeabc381b8bca 100644 (file)
@@ -141,7 +141,7 @@ gtk_css_image_cross_fade_snapshot (GtkCssImage *image,
 {
   GtkCssImageCrossFade *cross_fade = GTK_CSS_IMAGE_CROSS_FADE (image);
 
-  gtk_snapshot_push_cross_fade (snapshot, cross_fade->progress, "CrossFadeImage<%g>", cross_fade->progress);
+  gtk_snapshot_push_cross_fade (snapshot, cross_fade->progress);
 
   if (cross_fade->start)
     gtk_css_image_snapshot (cross_fade->start, snapshot, width, height);
index 8f869ccac3b43cffef25f37515f090f9c29443ad..f109337468f7bbacd6d26ce9efb02ac158a1e8be 100644 (file)
@@ -78,7 +78,7 @@ gtk_css_image_fallback_snapshot (GtkCssImage *image,
       else
         color = &red;
 
-      gtk_snapshot_append_color (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height), "image() Fallback Color");
+      gtk_snapshot_append_color (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height));
     }
   else
     gtk_css_image_snapshot (fallback->images[fallback->used], snapshot, width, height);
index 32bfca025f8f33e862c5fd739a8fbe5882abb392..d481659a4cb191f393d3b4d5afe817861ef177d7 100644 (file)
@@ -111,7 +111,7 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image,
                       });
       graphene_vec4_init (&offset, fg.red, fg.green, fg.blue, 0);
 
-      gtk_snapshot_push_color_matrix (snapshot, &matrix, &offset, "Recolor");
+      gtk_snapshot_push_color_matrix (snapshot, &matrix, &offset);
     }
 
   gtk_snapshot_append_texture (snapshot,
@@ -121,8 +121,7 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image,
                                    (height - texture_height) / 2.0,
                                    texture_width,
                                    texture_height
-                               ),
-                               "CssImageIconTheme<%s@%d>", icon_theme->name, icon_theme->scale);
+                               ));
   if (symbolic)
     gtk_snapshot_pop (snapshot);
 }
index 87cc64abc5af276045cd4055aec0aba1a7071cb8..1253ed8bf96639a0e3038b1e0d18f817ad843cbf 100644 (file)
@@ -186,8 +186,7 @@ gtk_css_image_linear_snapshot (GtkCssImage        *image,
 
       gtk_snapshot_append_color (snapshot,
                                  _gtk_css_rgba_value_get_rgba (stop->color),
-                                 &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                 "RepeatingLinearGradient<degenerate>");
+                                 &GRAPHENE_RECT_INIT (0, 0, width, height));
       return;
     }
 
@@ -238,8 +237,7 @@ gtk_css_image_linear_snapshot (GtkCssImage        *image,
           &GRAPHENE_POINT_INIT (width / 2 + x * (start - 0.5), height / 2 + y * (start - 0.5)),
           &GRAPHENE_POINT_INIT (width / 2 + x * (end - 0.5),   height / 2 + y * (end - 0.5)),
           stops,
-          linear->stops->len,
-          "RepeatingLinearGradient<%ustops>", linear->stops->len);
+          linear->stops->len);
     }
   else
     {
@@ -249,8 +247,7 @@ gtk_css_image_linear_snapshot (GtkCssImage        *image,
           &GRAPHENE_POINT_INIT (width / 2 + x * (start - 0.5), height / 2 + y * (start - 0.5)),
           &GRAPHENE_POINT_INIT (width / 2 + x * (end - 0.5),   height / 2 + y * (end - 0.5)),
           stops,
-          linear->stops->len,
-          "LinearGradient<%ustops>", linear->stops->len);
+          linear->stops->len);
     }
 }
 
index 88a03570229cd9dafb7f17283037da3cdd7d80ae..3b426978c44b550cc2c7c9320fdbe659a15841ed 100644 (file)
@@ -91,8 +91,7 @@ gtk_css_image_radial_snapshot (GtkCssImage *image,
   cairo_t *cr;
 
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                  "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height));
 
   x = _gtk_css_position_value_get_x (radial->position, width);
   y = _gtk_css_position_value_get_y (radial->position, height);
index 41c95e99f412ac09e5f9f69cb6c0322bf67be926..39ba7bd6f52497407119404018df9eb736238e01 100644 (file)
@@ -192,14 +192,11 @@ gtk_css_image_recolor_snapshot (GtkCssImage *image,
                        0, 0, 0, fg.alpha
                       });
   graphene_vec4_init (&offset, fg.red, fg.green, fg.blue, 0);
-  gtk_snapshot_push_color_matrix (snapshot, &matrix, &offset, "Recolor");
+  gtk_snapshot_push_color_matrix (snapshot, &matrix, &offset);
 
   gtk_snapshot_append_texture (snapshot,
                                recolor->texture,
-                               &GRAPHENE_RECT_INIT (0, 0, width, height),
-                               "Recolor Image %dx%d",
-                               gdk_texture_get_width (recolor->texture),
-                               gdk_texture_get_height (recolor->texture));
+                               &GRAPHENE_RECT_INIT (0, 0, width, height));
 
   gtk_snapshot_pop (snapshot);
 }
index 29eb13e6500ecaa2e727cc47df3b13dbef3933ee..2fad915882e9c083988654f2a1b6fef3bf16ef31 100644 (file)
@@ -37,8 +37,7 @@ gtk_css_image_win32_snapshot (GtkCssImage *image,
   cairo_t *cr;
 
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                  "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height));
 
   surface = gtk_win32_theme_create_surface (wimage->theme, wimage->part, wimage->state, wimage->margins,
                                            width, height, &dx, &dy);
index d31bb66c7a0a96e6446bd218fcf3598ad7e5b751..729b87999101189b9833c6cac5cc2f2ef4e37d8f 100644 (file)
@@ -417,7 +417,7 @@ gtk_css_shadows_value_push_snapshot (const GtkCssValue *value,
     {
       GskShadow *shadows = g_newa (GskShadow, value->len);
       gtk_css_shadows_value_get_shadows (value, shadows);
-      gtk_snapshot_push_shadow (snapshot, shadows, value->len, "Shadow<%u>", value->len);
+      gtk_snapshot_push_shadow (snapshot, shadows, value->len);
     }
 
   return need_shadow;
index f1198fff29466b3d40245d7e9cdaa3278a0a1175..62e0db7340e59689b103dd51900afeeced329eb3 100644 (file)
@@ -1055,8 +1055,6 @@ gtk_css_shadow_value_snapshot_outset (const GtkCssValue    *shadow,
                                      _gtk_css_number_value_get (shadow->voffset, 0),
                                      _gtk_css_number_value_get (shadow->spread, 0),
                                      _gtk_css_number_value_get (shadow->radius, 0));
-  if (gtk_snapshot_get_record_names (snapshot))
-    gsk_render_node_set_name (node, "Outset Shadow");
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 }
@@ -1086,8 +1084,6 @@ gtk_css_shadow_value_snapshot_inset (const GtkCssValue   *shadow,
                                     _gtk_css_number_value_get (shadow->voffset, 0),
                                     _gtk_css_number_value_get (shadow->spread, 0),
                                     _gtk_css_number_value_get (shadow->radius, 0));
-  if (gtk_snapshot_get_record_names (snapshot))
-    gsk_render_node_set_name (node, "Inset Shadow");
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 }
index 977e48e01926cc622c935601234c70d4348fb82b..8abc7511c6da673c977bf91b5965029797fac65d 100644 (file)
@@ -250,8 +250,7 @@ gtk_drawing_area_snapshot (GtkWidget   *widget,
                                   &GRAPHENE_RECT_INIT (
                                       0, 0,
                                       width, height
-                                  ),
-                                  "DrawingAreaContents");
+                                  ));
   priv->draw_func (self,
                    cr,
                    width, height,
index 6afd90e7b16f5877d3680f420de3486a844d56d4..1419cca03777f6bb5bf6838c62ebd1cd420efbcb 100644 (file)
@@ -3321,8 +3321,7 @@ gtk_entry_snapshot (GtkWidget   *widget,
                             priv->text_x,
                             0,
                             priv->text_width,
-                            gtk_widget_get_height (widget)),
-                          "Entry Clip");
+                            gtk_widget_get_height (widget)));
 
   /* Draw text and cursor */
   if (priv->dnd_position != -1)
@@ -5700,7 +5699,7 @@ gtk_entry_draw_text (GtkEntry    *entry,
       clip = gdk_pango_layout_get_clip_region (layout, x, y, range, 1);
       cairo_region_get_extents (clip, &clip_extents);
 
-      gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_extents), "Selected Text");
+      gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_extents));
       gtk_snapshot_render_background (snapshot, context, 0, 0, width, height);
       gtk_snapshot_render_layout (snapshot, context, x, y, layout);
       gtk_snapshot_pop (snapshot);
@@ -5763,7 +5762,7 @@ gtk_entry_draw_cursor (GtkEntry    *entry,
 
       gtk_style_context_save_to_node (context, priv->block_cursor_node);
 
-      gtk_snapshot_push_clip (snapshot, &bounds, "Block Cursor");
+      gtk_snapshot_push_clip (snapshot, &bounds);
       gtk_snapshot_render_background (snapshot, context,  0, 0, width, height);
       gtk_snapshot_render_layout (snapshot, context,  x, y, layout);
       gtk_snapshot_pop (snapshot);
index 879791bc8fded7255ab979e9df5a0896b2517a7a..a37159d32f5c74841fdfaed4e4d6ba3180495930 100644 (file)
@@ -2348,8 +2348,7 @@ gtk_flow_box_snapshot (GtkWidget   *widget,
       vertical = priv->orientation == GTK_ORIENTATION_VERTICAL;
 
       cr = gtk_snapshot_append_cairo (snapshot,
-                                      &GRAPHENE_RECT_INIT (x, y, width, height),
-                                      "FlowBox Rubberband");
+                                      &GRAPHENE_RECT_INIT (x, y, width, height));
 
       context = gtk_widget_get_style_context (widget);
       gtk_style_context_save_to_node (context, priv->rubberband_node);
index b02ed709dd5d0b79666d74f40bf0ed2b2385c0cd..6f98415d47c8f9b9fd3581aeb04a6b0a385dcf30 100644 (file)
@@ -744,8 +744,7 @@ gtk_gl_area_snapshot (GtkWidget   *widget,
                                    texture->holder,
                                    &GRAPHENE_RECT_INIT (0, 0,
                                                         gtk_widget_get_width (widget),
-                                                        gtk_widget_get_height (widget)),
-                                   "GL Area");
+                                                        gtk_widget_get_height (widget)));
 
       g_object_unref (texture->holder);
     }
index 012da29f450277f7cb8ab6df06c85c7981b8dadf..ff7ca21cd6193d1c80d84d33d3880b08ebeff167 100644 (file)
@@ -1665,8 +1665,7 @@ gtk_icon_view_snapshot (GtkWidget   *widget,
                           &GRAPHENE_RECT_INIT (
                               0, 0,
                               width, height
-                          ),
-                          "IconView Clip");
+                          ));
 
   gtk_snapshot_offset (snapshot,
                        - gtk_adjustment_get_value (icon_view->priv->hadjustment),
@@ -6699,7 +6698,7 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
       
       if (index == item->index)
         {
-          snapshot = gtk_snapshot_new (FALSE, "IconView DragIcon");
+          snapshot = gtk_snapshot_new ();
           gtk_icon_view_snapshot_item (icon_view, snapshot, item,
                                        icon_view->priv->item_padding,
                                        icon_view->priv->item_padding,
index b4f85bc6746193cf56c966332193c720cb8474f5..570d1ed3cde601ac47fa47cd459c0d30472640fa 100644 (file)
@@ -3870,7 +3870,7 @@ gtk_label_snapshot (GtkWidget   *widget,
             {
               cairo_region_get_rectangle (range_clip, i, &clip_rect);
 
-              gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_rect), "Selected Text");
+              gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_rect));
               gtk_snapshot_render_background (snapshot, context, x, 0, width, height);
               gtk_snapshot_render_layout (snapshot, context, lx, ly, priv->layout);
               gtk_snapshot_pop (snapshot);
@@ -3918,7 +3918,7 @@ gtk_label_snapshot (GtkWidget   *widget,
                 {
                   cairo_region_get_rectangle (range_clip, i, &clip_rect);
 
-                  gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_rect), "Active Link");
+                  gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_rect));
                   gtk_snapshot_render_background (snapshot, context, x, 0, width, height);
                   gtk_snapshot_render_layout (snapshot, context, lx, ly, priv->layout);
                   gtk_snapshot_pop (snapshot);
index 40eb6eb881897768234537d9b5175ad6c9304f65..fce0f0399bc03684e8f9fb312e86c9d2165b9aa8 100644 (file)
@@ -117,8 +117,7 @@ gtk_magnifier_snapshot (GtkWidget   *widget,
     return;
 
   gtk_snapshot_push_clip (snapshot,
-                          &GRAPHENE_RECT_INIT (0, 0, width, height),
-                          "MagnifierClip");
+                          &GRAPHENE_RECT_INIT (0, 0, width, height));
 
   graphene_matrix_init_translate (&transform, &GRAPHENE_POINT3D_INIT (
                                  - CLAMP (priv->x, 0, paintable_width),
@@ -130,7 +129,7 @@ gtk_magnifier_snapshot (GtkWidget   *widget,
   if (!priv->resize)
     graphene_matrix_translate (&transform, &GRAPHENE_POINT3D_INIT (width / 2, height / 2, 0));
 
-  gtk_snapshot_push_transform (snapshot, &transform, "Magnifier transform");
+  gtk_snapshot_push_transform (snapshot, &transform);
   gdk_paintable_snapshot (priv->paintable, snapshot, paintable_width, paintable_height);
   gtk_snapshot_pop (snapshot);
 
index 1978f49b44dc44047a3a6f464e07bf0920c61264..249cbd2e412215565cecad93495c2e6f7164c0c6 100644 (file)
@@ -2743,8 +2743,7 @@ gtk_menu_snapshot (GtkWidget   *widget,
                           &GRAPHENE_RECT_INIT(
                             0, 0,
                             gtk_widget_get_width (widget),
-                            gtk_widget_get_height (widget)),
-                          "MenuClip");
+                            gtk_widget_get_height (widget)));
 
   GTK_WIDGET_CLASS (gtk_menu_parent_class)->snapshot (widget, snapshot);
 
index a7fb2204696ba35290bf0e7407acdd278509fd3e..785865730d0cc9bd18a2df8d1fb867b96a48ab40 100644 (file)
@@ -672,8 +672,7 @@ gtk_overlay_snapshot (GtkWidget   *widget,
             {
               GtkSnapshot *child_snapshot;
 
-              child_snapshot = gtk_snapshot_new (gtk_snapshot_get_record_names (snapshot),
-                                                 "OverlayCaptureMainChild");
+              child_snapshot = gtk_snapshot_new ();
               gtk_snapshot_offset (child_snapshot, main_alloc.x, main_alloc.y);
               gtk_widget_snapshot (main_widget, child_snapshot);
               gtk_snapshot_offset (child_snapshot, -main_alloc.x, -main_alloc.y);
@@ -682,8 +681,8 @@ gtk_overlay_snapshot (GtkWidget   *widget,
 
           gtk_widget_get_allocation (child, &alloc);
           graphene_rect_init (&bounds, alloc.x, alloc.y, alloc.width, alloc.height);
-          gtk_snapshot_push_clip (snapshot, &bounds, "Overlay Effect Clip");
-          gtk_snapshot_push_blur (snapshot, blur, "Overlay Effect");
+          gtk_snapshot_push_clip (snapshot, &bounds);
+          gtk_snapshot_push_blur (snapshot, blur);
           gtk_snapshot_append_node (snapshot, main_widget_node);
           gtk_snapshot_pop (snapshot);
           gtk_snapshot_pop (snapshot);
@@ -714,7 +713,7 @@ gtk_overlay_snapshot (GtkWidget   *widget,
 
       cairo_region_get_rectangle (clip, i, &rect);
       graphene_rect_init (&bounds, rect.x, rect.y, rect.width, rect.height);
-      gtk_snapshot_push_clip (snapshot, &bounds, "Overlay Non-Effect Clip");
+      gtk_snapshot_push_clip (snapshot, &bounds);
       gtk_snapshot_append_node (snapshot, main_widget_node);
       gtk_snapshot_pop (snapshot);
     }
index 2331e9441260c8215f142895d356bc43a692aca0..14f050572cc0596b515b489c0cd45ef2b650c3bd 100644 (file)
@@ -1404,8 +1404,7 @@ gtk_paned_snapshot (GtkWidget   *widget,
                               0, 0,
                               gtk_widget_get_width (widget),
                               gtk_widget_get_height (widget)
-                          ),
-                          "GtkPaned");
+                          ));
 
   if (priv->child1 && gtk_widget_get_visible (priv->child1) &&
       priv->child2 && gtk_widget_get_visible (priv->child2))
index 1ec918f299d5a3c35e7c3ceb1537849b74a949f6..cec113c71d0211317c65854af550c5cc02d11767 100644 (file)
@@ -1216,8 +1216,7 @@ gtk_popover_snapshot (GtkWidget   *widget,
                                     0, 0,
                                     gtk_widget_get_width (widget),
                                     gtk_widget_get_height (widget)
-                                  ),
-                                  "Popover");
+                                  ));
 
   /* Clip to the arrow shape */
   cairo_save (cr);
index 7957f97b208fedc2162e927a2945d0830b49feff..e4143fedd8ff7b20c3bbf8c53954f8f3c5ecb928 100644 (file)
@@ -90,18 +90,15 @@ gtk_theming_background_snapshot_color (const GtkThemingBackground *bg,
     {
       gtk_snapshot_append_color (snapshot,
                                  bg_color,
-                                 &bg->boxes[clip].bounds,
-                                 "BackgroundColor");
+                                 &bg->boxes[clip].bounds);
     }
   else
     {
       gtk_snapshot_push_rounded_clip (snapshot,
-                                      &bg->boxes[clip],
-                                      "BackgroundColorClip");
+                                      &bg->boxes[clip]);
       gtk_snapshot_append_color (snapshot,
                                  bg_color,
-                                 &bg->boxes[clip].bounds,
-                                 "BackgroundColor");
+                                 &bg->boxes[clip].bounds);
       gtk_snapshot_pop (snapshot);
     }
 }
@@ -390,7 +387,8 @@ gtk_theming_background_snapshot_layer (const GtkThemingBackground *bg,
   if (image_height == height)
     vrepeat = GTK_CSS_REPEAT_STYLE_NO_REPEAT;
 
-  gtk_snapshot_push_rounded_clip (snapshot, clip, "BackgroundLayerClip<%u>", idx);
+  gtk_snapshot_push_debug (snapshot, "Layer %u", idx);
+  gtk_snapshot_push_rounded_clip (snapshot, clip);
 
   gtk_snapshot_offset (snapshot, origin->bounds.origin.x, origin->bounds.origin.y);
 
@@ -501,8 +499,7 @@ gtk_theming_background_snapshot_layer (const GtkThemingBackground *bg,
                                 &GRAPHENE_RECT_INIT (
                                     position_x, position_y,
                                     repeat_width, repeat_height
-                                ),
-                                "BackgroundLayerRepeat<%u>", idx);
+                                ));
                                 
       gtk_snapshot_offset (snapshot,
                            position_x + 0.5 * (repeat_width - image_width),
@@ -515,6 +512,7 @@ gtk_theming_background_snapshot_layer (const GtkThemingBackground *bg,
   gtk_snapshot_offset (snapshot, - origin->bounds.origin.x, - origin->bounds.origin.y);
 
   gtk_snapshot_pop (snapshot);
+  gtk_snapshot_pop (snapshot);
 }
 
 static void
@@ -640,6 +638,8 @@ gtk_css_style_snapshot_background (GtkCssStyle      *style,
 
   gtk_theming_background_init (&bg, style, width, height);
 
+  gtk_snapshot_push_debug (snapshot, "CSS background");
+
   gtk_css_shadows_value_snapshot_outset (box_shadow,
                                          snapshot,
                                          &bg.boxes[GTK_CSS_AREA_BORDER_BOX]);
@@ -653,8 +653,7 @@ gtk_css_style_snapshot_background (GtkCssStyle      *style,
       blend_mode_values[idx] = _gtk_css_blend_mode_value_get (_gtk_css_array_value_get_nth (blend_modes, idx));
 
       if (blend_mode_values[idx] != GSK_BLEND_MODE_DEFAULT)
-        gtk_snapshot_push_blend (snapshot, blend_mode_values[idx], "Background<%u>Blend<%u>",
-                                 idx, blend_mode_values[idx]);
+        gtk_snapshot_push_blend (snapshot, blend_mode_values[idx]);
     }
 
   if (!gdk_rgba_is_clear (bg_color))
@@ -677,5 +676,7 @@ gtk_css_style_snapshot_background (GtkCssStyle      *style,
   gtk_css_shadows_value_snapshot_inset (box_shadow,
                                         snapshot,
                                         &bg.boxes[GTK_CSS_AREA_PADDING_BOX]);
+
+  gtk_snapshot_pop (snapshot);
 }
 
index 540a66e2d8bd45a8948c911fa7803831a19fb7ff..be5993698a761ace1228a2d4194f7448e2a39c7d 100644 (file)
@@ -439,8 +439,6 @@ snapshot_frame_fill (GtkSnapshot          *snapshot,
   gsk_rounded_rect_offset (&offset_outline, off_x, off_y);
   
   node = gsk_border_node_new (&offset_outline, border_width, colors);
-  if (gtk_snapshot_get_record_names (snapshot))
-    gsk_render_node_set_name (node, "Border");
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 }
@@ -591,8 +589,7 @@ snapshot_frame_stroke (GtkSnapshot    *snapshot,
   cairo_t *cr;
 
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &outline->bounds,
-                                  "BorderStroke");
+                                  &outline->bounds);
   render_frame_stroke (cr, outline, double_width, colors, hidden_side, stroke_style);
   cairo_destroy (cr);
 }
@@ -942,11 +939,12 @@ gtk_css_style_snapshot_border (GtkCssStyle *style,
     {
       double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] };
 
+      gtk_snapshot_push_debug (snapshot, "CSS border image");
       cr = gtk_snapshot_append_cairo (snapshot,
-                                      &bounds,
-                                      "Border Image");
+                                      &bounds);
       gtk_border_image_render (&border_image, double_width, cr, 0, 0, width, height);
       cairo_destroy (cr);
+      gtk_snapshot_pop (snapshot);
     }
   else
     {
@@ -978,7 +976,9 @@ gtk_css_style_snapshot_border (GtkCssStyle *style,
 
       gtk_rounded_boxes_init_for_style (&border_box, NULL, NULL, style, 0, 0, width, height);
 
+      gtk_snapshot_push_debug (snapshot, "CSS border");
       snapshot_border (snapshot, &border_box, border_width, colors, border_style);
+      gtk_snapshot_pop (snapshot);
     }
 }
 
index 0060cb671037182df94319489d42be29902aef05..3ebb941008c12d4f5248be71b7c5dbab977ecb18 100644 (file)
@@ -119,6 +119,8 @@ gtk_css_style_snapshot_icon (GtkCssStyle            *style,
   if (!gtk_css_transform_value_get_matrix (transform_value, &transform_matrix))
     return;
 
+  gtk_snapshot_push_debug (snapshot, "CSS Icon @ %gx%g", width, height);
+
   gtk_css_filter_value_push_snapshot (filter_value, snapshot);
 
   has_shadow = gtk_css_shadows_value_push_snapshot (shadows_value, snapshot);
@@ -137,7 +139,7 @@ gtk_css_style_snapshot_icon (GtkCssStyle            *style,
       graphene_matrix_init_translate (&m2, &GRAPHENE_POINT3D_INIT (- width / 2.0, - height / 2.0, 0));
       graphene_matrix_multiply (&m2, &m3, &m1);
 
-      gtk_snapshot_push_transform (snapshot, &m1, "CSS Icon Transform Container");
+      gtk_snapshot_push_transform (snapshot, &m1);
 
       gtk_css_image_builtin_snapshot (image, snapshot, width, height, builtin_type);
 
@@ -148,6 +150,8 @@ gtk_css_style_snapshot_icon (GtkCssStyle            *style,
     gtk_snapshot_pop (snapshot);
 
   gtk_css_filter_value_pop_snapshot (filter_value, snapshot);
+
+  gtk_snapshot_pop (snapshot);
 }
 
 static gboolean
@@ -309,7 +313,7 @@ gtk_css_style_snapshot_icon_paintable (GtkCssStyle  *style,
                                        });
       graphene_vec4_init (&color_offset, fg.red, fg.green, fg.blue, 0);
 
-      gtk_snapshot_push_color_matrix (snapshot, &color_matrix, &color_offset, "Recoloring Icon");
+      gtk_snapshot_push_color_matrix (snapshot, &color_matrix, &color_offset);
     }
 
   if (graphene_matrix_is_identity (&transform_matrix))
@@ -326,7 +330,7 @@ gtk_css_style_snapshot_icon_paintable (GtkCssStyle  *style,
       graphene_matrix_init_translate (&m2, &GRAPHENE_POINT3D_INIT (- width / 2.0, - height / 2.0, 0));
       graphene_matrix_multiply (&m2, &m3, &m1);
 
-      gtk_snapshot_push_transform (snapshot, &m1, "Icon Transform");
+      gtk_snapshot_push_transform (snapshot, &m1);
 
       gdk_paintable_snapshot (paintable, snapshot, width, height);
 
index 5ec8160946129ace596fdb70934e521fea0e9415..0ca586d8202f35e73bdcc3a9caa4235f2914de7e 100644 (file)
@@ -57,11 +57,10 @@ gtk_render_node_paintable_paintable_snapshot (GdkPaintable *paintable,
                                   height / (self->bounds.size.height),
                                   1.0);
       gtk_snapshot_push_transform (snapshot,
-                                   &transform,
-                                   "RenderNodeScaleToFit");
+                                   &transform);
     }
 
-  gtk_snapshot_push_clip (snapshot, &self->bounds, "RenderNodePaintableClip");
+  gtk_snapshot_push_clip (snapshot, &self->bounds);
   gtk_snapshot_offset (snapshot, self->bounds.origin.x, self->bounds.origin.y);
 
   gtk_snapshot_append_node (snapshot, self->node);
index c8d00190b4ea937fcc89ec250452dcd68dabbd67..49aa81458e2068cf937eaf128de6d5847341ff3f 100644 (file)
@@ -637,8 +637,7 @@ gtk_revealer_snapshot (GtkWidget   *widget,
                                   0, 0,
                                   gtk_widget_get_width (widget),
                                   gtk_widget_get_height (widget)
-                              ),
-                              "RevealerClip");
+                              ));
       gtk_widget_snapshot_child (widget, child, snapshot);
       gtk_snapshot_pop (snapshot);
     }
index 2d9caa718fd12bddfc3c719d59306de626e31d74..266e4dc74a19809223f9624c6cc41484988cf9c7 100644 (file)
@@ -53,10 +53,7 @@ gtk_scaler_paintable_snapshot (GdkPaintable *paintable,
       graphene_matrix_t scale_matrix;
 
       graphene_matrix_init_scale (&scale_matrix, 1.0 / self->scale_factor, 1.0 / self->scale_factor, 1.0);
-      gtk_snapshot_push_transform (snapshot,
-                                   &scale_matrix,
-                                   "GtkScaler<%g>",
-                                   self->scale_factor);
+      gtk_snapshot_push_transform (snapshot, &scale_matrix);
       gdk_paintable_snapshot (self->paintable,
                               snapshot,
                               width * self->scale_factor,
index 712c7cb7e36337b52625116f87b6483f10bbabda..3b175505dd2747fcd72b9252f47747bfb2dbae3a 100644 (file)
@@ -85,8 +85,7 @@ static GskRenderNode *
 gtk_snapshot_collect_default (GtkSnapshot       *snapshot,
                               GtkSnapshotState  *state,
                               GskRenderNode    **nodes,
-                              guint              n_nodes,
-                              const char        *name)
+                              guint              n_nodes)
 {
   GskRenderNode *node;
 
@@ -101,8 +100,6 @@ gtk_snapshot_collect_default (GtkSnapshot       *snapshot,
   else
     {
       node = gsk_container_node_new (nodes, n_nodes);
-      if (name)
-        gsk_render_node_set_name (node, name);
     }
 
   return node;
@@ -110,14 +107,12 @@ gtk_snapshot_collect_default (GtkSnapshot       *snapshot,
 
 static GtkSnapshotState *
 gtk_snapshot_push_state (GtkSnapshot            *snapshot,
-                         char                   *name,
                          int                     translate_x,
                          int                     translate_y,
                          GtkSnapshotCollectFunc  collect_func)
 {
   GtkSnapshotState state = { 0, };
 
-  state.name = name;
   state.translate_x = translate_x;
   state.translate_y = translate_y;
   state.collect_func = collect_func;
@@ -148,83 +143,30 @@ gtk_snapshot_get_previous_state (const GtkSnapshot *snapshot)
 static void
 gtk_snapshot_state_clear (GtkSnapshotState *state)
 {
-  g_clear_pointer (&state->name, g_free);
-}
-
-static GtkSnapshot *
-gtk_snapshot_new_internal (gboolean               record_names,
-                           char                  *name)
-{
-  GtkSnapshot *snapshot;
-
-  snapshot = g_object_new (GTK_TYPE_SNAPSHOT, NULL);
-
-  snapshot->record_names = record_names;
-  snapshot->state_stack = g_array_new (FALSE, TRUE, sizeof (GtkSnapshotState));
-  g_array_set_clear_func (snapshot->state_stack, (GDestroyNotify)gtk_snapshot_state_clear);
-  snapshot->nodes = g_ptr_array_new_with_free_func ((GDestroyNotify)gsk_render_node_unref);
-
-  gtk_snapshot_push_state (snapshot,
-                           name,
-                           0, 0,
-                           gtk_snapshot_collect_default);
-
-  return snapshot;
 }
 
 /**
  * gtk_snapshot_new:
- * @record_names: whether to keep node names (for debugging purposes)
- * @name: a printf-style format string to create the node name
- * @...: arguments for @name
  *
  * Creates a new #GtkSnapshot.
  *
  * Returns: a newly-allocated #GtkSnapshot
  */
 GtkSnapshot *
-gtk_snapshot_new (gboolean    record_names,
-                  const char *name,
-                  ...)
-{
-  char *str;
-
-  if (name && record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
-
-  return gtk_snapshot_new_internal (record_names,
-                                    str);
-}
-
-GtkSnapshot *
-gtk_snapshot_new_child (GtkSnapshot *parent,
-                        const char  *name,
-                        ...)
+gtk_snapshot_new (void)
 {
   GtkSnapshot *snapshot;
-  char *str;
 
-  if (name && parent->record_names)
-    {
-      va_list args;
+  snapshot = g_object_new (GTK_TYPE_SNAPSHOT, NULL);
 
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
+  snapshot->record_names = FALSE;
+  snapshot->state_stack = g_array_new (FALSE, TRUE, sizeof (GtkSnapshotState));
+  g_array_set_clear_func (snapshot->state_stack, (GDestroyNotify)gtk_snapshot_state_clear);
+  snapshot->nodes = g_ptr_array_new_with_free_func ((GDestroyNotify)gsk_render_node_unref);
 
-  snapshot = gtk_snapshot_new_internal (parent->record_names,
-                                        str);
+  gtk_snapshot_push_state (snapshot,
+                           0, 0,
+                           gtk_snapshot_collect_default);
 
   return snapshot;
 }
@@ -272,72 +214,68 @@ gtk_snapshot_free_to_paintable (GtkSnapshot           *snapshot,
   return result;
 }
 
-/**
- * gtk_snapshot_push:
- * @snapshot: a #GtkSnapshot
- * @keep_coordinates: If %TRUE, the current offset will be kept.
- *     Otherwise, the offset will be reset to (0, 0).
- * @name: (transfer none): a printf() style format string for the name for the new node
- * @...: arguments to insert into the format string
- *
- * Creates a new render node, appends it to the current render
- * node of @snapshot, and makes it the new current render node.
- */
+static GskRenderNode *
+gtk_snapshot_collect_debug (GtkSnapshot      *snapshot,
+                            GtkSnapshotState *state,
+                            GskRenderNode   **nodes,
+                            guint             n_nodes)
+{
+  GskRenderNode *node, *debug_node;
+
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
+  if (node == NULL)
+    return NULL;
+
+  if (state->data.debug.message == NULL)
+    return node;
+
+  debug_node = gsk_debug_node_new (node, state->data.debug.message);
+
+  gsk_render_node_unref (node);
+
+  return debug_node;
+}
+
 void
-gtk_snapshot_push (GtkSnapshot           *snapshot,
-                   gboolean               keep_coordinates,
-                   const char            *name,
-                   ...)
+gtk_snapshot_push_debug (GtkSnapshot *snapshot,
+                         const char  *message,
+                         ...)
 {
-  char *str;
+  GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
+  GtkSnapshotState *state;
 
-  if (name && snapshot->record_names)
+  state = gtk_snapshot_push_state (snapshot,
+                                   current_state->translate_x,
+                                   current_state->translate_y,
+                                   gtk_snapshot_collect_debug);
+
+  if (snapshot->record_names)
     {
       va_list args;
 
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
+      va_start (args, message);
+      state->data.debug.message = g_strdup_vprintf (message, args);
       va_end (args);
     }
-  else
-    str = NULL;
-
-  if (keep_coordinates)
-    {
-      GtkSnapshotState *state = gtk_snapshot_get_current_state (snapshot);
-
-      gtk_snapshot_push_state (snapshot,
-                               g_strdup (str),
-                               state->translate_x,
-                               state->translate_y,
-                               gtk_snapshot_collect_default);
-
-    }
   else
     {
-      gtk_snapshot_push_state (snapshot,
-                               g_strdup (str),
-                               0, 0,
-                               gtk_snapshot_collect_default);
+      state->data.debug.message = NULL;
     }
 }
 
 static GskRenderNode *
 gtk_snapshot_collect_transform (GtkSnapshot      *snapshot,
                                 GtkSnapshotState *state,
-                                GskRenderNode **nodes,
-                                guint           n_nodes,
-                                const char     *name)
+                                GskRenderNode   **nodes,
+                                guint             n_nodes)
 {
   GskRenderNode *node, *transform_node;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
   transform_node = gsk_transform_node_new (node, &state->data.transform.transform);
-  if (name)
-    gsk_render_node_set_name (transform_node, name);
 
   gsk_render_node_unref (node);
 
@@ -346,28 +284,13 @@ gtk_snapshot_collect_transform (GtkSnapshot      *snapshot,
 
 void
 gtk_snapshot_push_transform (GtkSnapshot             *snapshot,
-                             const graphene_matrix_t *transform,
-                             const char              *name,
-                             ...)
+                             const graphene_matrix_t *transform)
 {
   GtkSnapshotState *previous_state;
   GtkSnapshotState *state;
   graphene_matrix_t offset;
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    0, 0,
                                    gtk_snapshot_collect_transform);
 
@@ -387,13 +310,12 @@ static GskRenderNode *
 gtk_snapshot_collect_offset (GtkSnapshot       *snapshot,
                              GtkSnapshotState  *state,
                              GskRenderNode    **nodes,
-                             guint              n_nodes,
-                             const char        *name)
+                             guint              n_nodes)
 {
   GskRenderNode *node, *offset_node;
   GtkSnapshotState  *previous_state;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
@@ -418,9 +340,6 @@ gtk_snapshot_collect_offset (GtkSnapshot       *snapshot,
                                          previous_state->translate_y);
     }
 
-  if (name)
-    gsk_render_node_set_name (offset_node, name);
-
   gsk_render_node_unref (node);
 
   return offset_node;
@@ -429,32 +348,20 @@ gtk_snapshot_collect_offset (GtkSnapshot       *snapshot,
 static void
 gtk_snapshot_push_offset (GtkSnapshot *snapshot)
 {
-  GtkSnapshotState *state = gtk_snapshot_get_current_state (snapshot);
-  char *str;
-
-  if (snapshot->record_names)
-    {
-      str = g_strdup_printf ("Offset<%d,%d>", state->translate_x, state->translate_y);
-    }
-  else
-    str = NULL;
-
-  state = gtk_snapshot_push_state (snapshot,
-                                   str,
-                                   0, 0,
-                                   gtk_snapshot_collect_offset);
+  gtk_snapshot_push_state (snapshot,
+                           0, 0,
+                           gtk_snapshot_collect_offset);
 }
 
 static GskRenderNode *
 gtk_snapshot_collect_opacity (GtkSnapshot      *snapshot,
                               GtkSnapshotState *state,
-                              GskRenderNode **nodes,
-                              guint           n_nodes,
-                              const char     *name)
+                              GskRenderNode   **nodes,
+                              guint             n_nodes)
 {
   GskRenderNode *node, *opacity_node;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
@@ -470,8 +377,6 @@ gtk_snapshot_collect_opacity (GtkSnapshot      *snapshot,
   else
     {
       opacity_node = gsk_opacity_node_new (node, state->data.opacity.opacity);
-      if (name)
-        gsk_render_node_set_name (opacity_node, name);
       gsk_render_node_unref (node);
     }
 
@@ -480,27 +385,12 @@ gtk_snapshot_collect_opacity (GtkSnapshot      *snapshot,
 
 void
 gtk_snapshot_push_opacity (GtkSnapshot *snapshot,
-                           double       opacity,
-                           const char  *name,
-                           ...)
+                           double       opacity)
 {
   GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *state;
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    current_state->translate_x,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_opacity);
@@ -510,14 +400,13 @@ gtk_snapshot_push_opacity (GtkSnapshot *snapshot,
 static GskRenderNode *
 gtk_snapshot_collect_blur (GtkSnapshot      *snapshot,
                            GtkSnapshotState *state,
-                           GskRenderNode **nodes,
-                           guint           n_nodes,
-                           const char     *name)
+                           GskRenderNode   **nodes,
+                           guint             n_nodes)
 {
   GskRenderNode *node, *blur_node;
   double radius;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
@@ -527,8 +416,6 @@ gtk_snapshot_collect_blur (GtkSnapshot      *snapshot,
     return node;
 
   blur_node = gsk_blur_node_new (node, radius);
-  if (name)
-    gsk_render_node_set_name (blur_node, name);
 
   gsk_render_node_unref (node);
 
@@ -537,44 +424,27 @@ gtk_snapshot_collect_blur (GtkSnapshot      *snapshot,
 
 void
 gtk_snapshot_push_blur (GtkSnapshot *snapshot,
-                        double       radius,
-                        const char  *name,
-                        ...)
+                        double       radius)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *state;
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    current_state->translate_x,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_blur);
   state->data.blur.radius = radius;
-  current_state = state;
 }
 
 static GskRenderNode *
 gtk_snapshot_collect_color_matrix (GtkSnapshot      *snapshot,
                                    GtkSnapshotState *state,
                                    GskRenderNode   **nodes,
-                                   guint             n_nodes,
-                                   const char       *name)
+                                   guint             n_nodes)
 {
   GskRenderNode *node, *color_matrix_node;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
@@ -614,43 +484,24 @@ gtk_snapshot_collect_color_matrix (GtkSnapshot      *snapshot,
       gsk_render_node_unref (node);
     }
 
-  if (name)
-    gsk_render_node_set_name (color_matrix_node, name);
-
   return color_matrix_node;
 }
 
 void
 gtk_snapshot_push_color_matrix (GtkSnapshot             *snapshot,
                                 const graphene_matrix_t *color_matrix,
-                                const graphene_vec4_t   *color_offset,
-                                const char              *name,
-                                ...)
+                                const graphene_vec4_t   *color_offset)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *state;
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    current_state->translate_x,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_color_matrix);
 
   graphene_matrix_init_from_matrix (&state->data.color_matrix.matrix, color_matrix);
   graphene_vec4_init_from_vec4 (&state->data.color_matrix.offset, color_offset);
-  current_state = state;
 }
 
 static void
@@ -667,22 +518,19 @@ static GskRenderNode *
 gtk_snapshot_collect_repeat (GtkSnapshot      *snapshot,
                              GtkSnapshotState *state,
                              GskRenderNode   **nodes,
-                             guint             n_nodes,
-                             const char       *name)
+                             guint             n_nodes)
 {
   GskRenderNode *node, *repeat_node;
   graphene_rect_t *bounds = &state->data.repeat.bounds;
   graphene_rect_t *child_bounds = &state->data.repeat.child_bounds;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
   repeat_node = gsk_repeat_node_new (bounds,
                                      node,
                                      child_bounds->size.width > 0 ? child_bounds : NULL);
-  if (name)
-    gsk_render_node_set_name (repeat_node, name);
 
   gsk_render_node_unref (node);
 
@@ -692,31 +540,16 @@ gtk_snapshot_collect_repeat (GtkSnapshot      *snapshot,
 void
 gtk_snapshot_push_repeat (GtkSnapshot           *snapshot,
                           const graphene_rect_t *bounds,
-                          const graphene_rect_t *child_bounds,
-                          const char            *name,
-                          ...)
+                          const graphene_rect_t *child_bounds)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *state;
   graphene_rect_t real_child_bounds = { { 0 } };
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   if (child_bounds)
     graphene_rect_offset_r (child_bounds, current_state->translate_x, current_state->translate_y, &real_child_bounds);
 
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    current_state->translate_x,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_repeat);
@@ -725,20 +558,17 @@ gtk_snapshot_push_repeat (GtkSnapshot           *snapshot,
 
   graphene_rect_offset_r (bounds, current_state->translate_x, current_state->translate_y, &state->data.repeat.bounds);
   state->data.repeat.child_bounds = real_child_bounds;
-
-  current_state = state;
 }
 
 static GskRenderNode *
 gtk_snapshot_collect_clip (GtkSnapshot      *snapshot,
                            GtkSnapshotState *state,
                            GskRenderNode   **nodes,
-                           guint             n_nodes,
-                           const char       *name)
+                           guint             n_nodes)
 {
   GskRenderNode *node, *clip_node;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
@@ -751,8 +581,6 @@ gtk_snapshot_collect_clip (GtkSnapshot      *snapshot,
     return NULL;
 
   clip_node = gsk_clip_node_new (node, &state->data.clip.bounds);
-  if (name)
-    gsk_render_node_set_name (clip_node, name);
 
   gsk_render_node_unref (node);
 
@@ -761,33 +589,18 @@ gtk_snapshot_collect_clip (GtkSnapshot      *snapshot,
 
 void
 gtk_snapshot_push_clip (GtkSnapshot           *snapshot,
-                        const graphene_rect_t *bounds,
-                        const char            *name,
-                        ...)
+                        const graphene_rect_t *bounds)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *state;
   graphene_rect_t real_bounds;
   cairo_rectangle_int_t rect;
-  char *str;
 
   graphene_rect_offset_r (bounds, current_state->translate_x, current_state->translate_y, &real_bounds);
 
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
-
   rectangle_init_from_graphene (&rect, &real_bounds);
 
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    current_state->translate_x,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_clip);
@@ -799,12 +612,11 @@ static GskRenderNode *
 gtk_snapshot_collect_rounded_clip (GtkSnapshot      *snapshot,
                                    GtkSnapshotState *state,
                                    GskRenderNode   **nodes,
-                                   guint             n_nodes,
-                                   const char       *name)
+                                   guint             n_nodes)
 {
   GskRenderNode *node, *clip_node;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
@@ -833,9 +645,6 @@ gtk_snapshot_collect_rounded_clip (GtkSnapshot      *snapshot,
       return NULL;
     }
 
-  if (name)
-    gsk_render_node_set_name (clip_node, name);
-
   gsk_render_node_unref (node);
 
   return clip_node;
@@ -843,36 +652,20 @@ gtk_snapshot_collect_rounded_clip (GtkSnapshot      *snapshot,
 
 void
 gtk_snapshot_push_rounded_clip (GtkSnapshot          *snapshot,
-                                const GskRoundedRect *bounds,
-                                const char           *name,
-                                ...)
+                                const GskRoundedRect *bounds)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *state;
   GskRoundedRect real_bounds;
-  char *str;
 
   gsk_rounded_rect_init_copy (&real_bounds, bounds);
   gsk_rounded_rect_offset (&real_bounds, current_state->translate_x, current_state->translate_y);
 
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
-
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    current_state->translate_x,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_rounded_clip);
 
-
   state->data.rounded_clip.bounds = real_bounds;
 }
 
@@ -880,12 +673,11 @@ static GskRenderNode *
 gtk_snapshot_collect_shadow (GtkSnapshot      *snapshot,
                              GtkSnapshotState *state,
                              GskRenderNode   **nodes,
-                             guint             n_nodes,
-                             const char       *name)
+                             guint             n_nodes)
 {
   GskRenderNode *node, *shadow_node;
 
-  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   if (node == NULL)
     return NULL;
 
@@ -894,8 +686,6 @@ gtk_snapshot_collect_shadow (GtkSnapshot      *snapshot,
                                      state->data.shadow.shadows :
                                      &state->data.shadow.a_shadow,
                                      state->data.shadow.n_shadows);
-  if (name)
-    gsk_render_node_set_name (shadow_node, name);
 
   gsk_render_node_unref (node);
   g_free (state->data.shadow.shadows);
@@ -904,29 +694,14 @@ gtk_snapshot_collect_shadow (GtkSnapshot      *snapshot,
 }
 
 void
-gtk_snapshot_push_shadow (GtkSnapshot            *snapshot,
-                          const GskShadow        *shadow,
-                          gsize                   n_shadows,
-                          const char             *name,
-                          ...)
+gtk_snapshot_push_shadow (GtkSnapshot     *snapshot,
+                          const GskShadow *shadow,
+                          gsize            n_shadows)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *state;
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   state = gtk_snapshot_push_state (snapshot,
-                                   str,
                                    current_state->translate_x,
                                    current_state->translate_y,
                                    gtk_snapshot_collect_shadow);
@@ -949,13 +724,12 @@ static GskRenderNode *
 gtk_snapshot_collect_blend_top (GtkSnapshot      *snapshot,
                                 GtkSnapshotState *state,
                                 GskRenderNode   **nodes,
-                                guint             n_nodes,
-                                const char       *name)
+                                guint             n_nodes)
 {
   GskRenderNode *bottom_node, *top_node, *blend_node;
   GdkRGBA transparent = { 0, 0, 0, 0 };
 
-  top_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  top_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   bottom_node = state->data.blend.bottom_node;
 
   g_assert (top_node != NULL || bottom_node != NULL);
@@ -967,7 +741,6 @@ gtk_snapshot_collect_blend_top (GtkSnapshot      *snapshot,
     bottom_node = gsk_color_node_new (&transparent, &top_node->bounds);
 
   blend_node = gsk_blend_node_new (bottom_node, top_node, state->data.blend.blend_mode);
-  gsk_render_node_set_name (blend_node, name);
 
   gsk_render_node_unref (top_node);
   gsk_render_node_unref (bottom_node);
@@ -979,14 +752,13 @@ static GskRenderNode *
 gtk_snapshot_collect_blend_bottom (GtkSnapshot      *snapshot,
                                    GtkSnapshotState *state,
                                    GskRenderNode   **nodes,
-                                   guint             n_nodes,
-                                   const char       *name)
+                                   guint             n_nodes)
 {
   GtkSnapshotState *prev_state = gtk_snapshot_get_previous_state (snapshot);
 
   g_assert (prev_state->collect_func == gtk_snapshot_collect_blend_top);
 
-  prev_state->data.blend.bottom_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  prev_state->data.blend.bottom_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
 
   return NULL;
 }
@@ -995,8 +767,6 @@ gtk_snapshot_collect_blend_bottom (GtkSnapshot      *snapshot,
  * gtk_snapshot_push_blend:
  * @snapshot: a #GtkSnapshot
  * @blend_mode: blend mode to use
- * @name: printf format string for name of the pushed node
- * @...: printf-style arguments for the @name string
  *
  * Blends together 2 images with the given blend mode.
  *
@@ -1008,34 +778,18 @@ gtk_snapshot_collect_blend_bottom (GtkSnapshot      *snapshot,
  **/
 void
 gtk_snapshot_push_blend (GtkSnapshot  *snapshot,
-                         GskBlendMode  blend_mode,
-                         const char   *name,
-                         ...)
+                         GskBlendMode  blend_mode)
 {
   GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *top_state;
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   top_state = gtk_snapshot_push_state (snapshot,
-                                       str,
                                        current_state->translate_x,
                                        current_state->translate_y,
                                        gtk_snapshot_collect_blend_top);
   top_state->data.blend.blend_mode = blend_mode;
 
   gtk_snapshot_push_state (snapshot,
-                           g_strdup (str),
                            top_state->translate_x,
                            top_state->translate_y,
                            gtk_snapshot_collect_blend_bottom);
@@ -1045,12 +799,11 @@ static GskRenderNode *
 gtk_snapshot_collect_cross_fade_end (GtkSnapshot      *snapshot,
                                      GtkSnapshotState *state,
                                      GskRenderNode   **nodes,
-                                     guint             n_nodes,
-                                     const char       *name)
+                                     guint             n_nodes)
 {
   GskRenderNode *start_node, *end_node, *node;
 
-  end_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  end_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
   start_node = state->data.cross_fade.start_node;
 
   if (state->data.cross_fade.progress <= 0.0)
@@ -1070,7 +823,6 @@ gtk_snapshot_collect_cross_fade_end (GtkSnapshot      *snapshot,
   else if (start_node && end_node)
     {
       node = gsk_cross_fade_node_new (start_node, end_node, state->data.cross_fade.progress);
-      gsk_render_node_set_name (node, name);
 
       gsk_render_node_unref (start_node);
       gsk_render_node_unref (end_node);
@@ -1078,14 +830,12 @@ gtk_snapshot_collect_cross_fade_end (GtkSnapshot      *snapshot,
   else if (start_node)
     {
       node = gsk_opacity_node_new (start_node, 1.0 - state->data.cross_fade.progress);
-      gsk_render_node_set_name (node, name);
 
       gsk_render_node_unref (start_node);
     }
   else if (end_node)
     {
       node = gsk_opacity_node_new (end_node, state->data.cross_fade.progress);
-      gsk_render_node_set_name (node, name);
 
       gsk_render_node_unref (end_node);
     }
@@ -1101,14 +851,13 @@ static GskRenderNode *
 gtk_snapshot_collect_cross_fade_start (GtkSnapshot      *snapshot,
                                        GtkSnapshotState *state,
                                        GskRenderNode   **nodes,
-                                       guint             n_nodes,
-                                       const char       *name)
+                                       guint             n_nodes)
 {
   GtkSnapshotState *prev_state = gtk_snapshot_get_previous_state (snapshot);
 
   g_assert (prev_state->collect_func == gtk_snapshot_collect_cross_fade_end);
 
-  prev_state->data.cross_fade.start_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
+  prev_state->data.cross_fade.start_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes);
 
   return NULL;
 }
@@ -1117,8 +866,6 @@ gtk_snapshot_collect_cross_fade_start (GtkSnapshot      *snapshot,
  * gtk_snapshot_push_cross_fade:
  * @snapshot: a #GtkSnapshot
  * @progress: progress between 0.0 and 1.0
- * @name: printf format string for name of the pushed node
- * @...: printf-style arguments for the @name string
  *
  * Snapshots a cross-fade operation between two images with the
  * given @progress.
@@ -1131,34 +878,18 @@ gtk_snapshot_collect_cross_fade_start (GtkSnapshot      *snapshot,
  **/
 void
 gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot,
-                              double       progress,
-                              const char  *name,
-                              ...)
+                              double       progress)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GtkSnapshotState *end_state;
-  char *str;
-
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-    }
-  else
-    str = NULL;
 
   end_state = gtk_snapshot_push_state (snapshot,
-                                       str,
                                        current_state->translate_x,
                                        current_state->translate_y,
                                        gtk_snapshot_collect_cross_fade_end);
   end_state->data.cross_fade.progress = progress;
 
   gtk_snapshot_push_state (snapshot,
-                           g_strdup (str),
                            end_state->translate_x,
                            end_state->translate_y,
                            gtk_snapshot_collect_cross_fade_start);
@@ -1183,8 +914,7 @@ gtk_snapshot_pop_internal (GtkSnapshot *snapshot)
   node = state->collect_func (snapshot,
                               state,
                               (GskRenderNode **) snapshot->nodes->pdata + state->start_node_index,
-                              state->n_nodes,
-                              state->name);
+                              state->n_nodes);
 
   /* The collect func may not modify the state stack... */
   g_assert (state_index == snapshot->state_stack->len - 1);
@@ -1220,15 +950,7 @@ gtk_snapshot_to_node (GtkSnapshot *snapshot)
   /* We should have exactly our initial state */
   if (snapshot->state_stack->len > 1)
     {
-      gint i;
-
-      g_warning ("Too many gtk_snapshot_push() calls. Still there:");
-      for (i = snapshot->state_stack->len - 1; i >= 0; i --)
-        {
-          const GtkSnapshotState *s = &g_array_index (snapshot->state_stack, GtkSnapshotState, i);
-
-          g_warning ("%s", s->name);
-        }
+      g_warning ("Too many gtk_snapshot_push() calls. %u states remaining.", snapshot->state_stack->len);
     }
   
   result = gtk_snapshot_pop_internal (snapshot);
@@ -1294,21 +1016,6 @@ gtk_snapshot_pop (GtkSnapshot *snapshot)
     }
 }
 
-/**
- * gtk_snapshot_get_record_names:
- * @snapshot: a #GtkSnapshot
- *
- * Obtains whether the snapshot is recording names
- * for debugging.
- *
- * Returns: whether the snapshot records names
- */
-gboolean
-gtk_snapshot_get_record_names (GtkSnapshot *snapshot)
-{
-  return snapshot->record_names;
-}
-
 /**
  * gtk_snapshot_offset:
  * @snapshot: a $GtkSnapshot
@@ -1404,8 +1111,6 @@ gtk_snapshot_append_node (GtkSnapshot   *snapshot,
  * gtk_snapshot_append_cairo:
  * @snapshot: a #GtkSnapshot
  * @bounds: the bounds for the new node
- * @name: (transfer none): a printf() style format string for the name for the new node
- * @...: arguments to insert into the format string
  *
  * Creates a new render node and appends it to the current render
  * node of @snapshot, without changing the current node.
@@ -1415,9 +1120,7 @@ gtk_snapshot_append_node (GtkSnapshot   *snapshot,
  */
 cairo_t *
 gtk_snapshot_append_cairo (GtkSnapshot           *snapshot,
-                           const graphene_rect_t *bounds,
-                           const char            *name,
-                           ...)
+                           const graphene_rect_t *bounds)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GskRenderNode *node;
@@ -1431,20 +1134,6 @@ gtk_snapshot_append_cairo (GtkSnapshot           *snapshot,
 
   node = gsk_cairo_node_new (&real_bounds);
 
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-      char *str;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-
-      gsk_render_node_set_name (node, str);
-
-      g_free (str);
-    }
-
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 
@@ -1460,18 +1149,14 @@ gtk_snapshot_append_cairo (GtkSnapshot           *snapshot,
  * @snapshot: a #GtkSnapshot
  * @texture: the #GdkTexture to render
  * @bounds: the bounds for the new node
- * @name: (transfer none): a printf() style format string for the name for the new node
- * @...: arguments to insert into the format string
  *
  * Creates a new render node drawing the @texture into the given @bounds and appends it
  * to the current render node of @snapshot.
  **/
 void
-gtk_snapshot_append_texture (GtkSnapshot            *snapshot,
-                             GdkTexture             *texture,
-                             const graphene_rect_t  *bounds,
-                             const char             *name,
-                             ...)
+gtk_snapshot_append_texture (GtkSnapshot           *snapshot,
+                             GdkTexture            *texture,
+                             const graphene_rect_t *bounds)
 {
   GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GskRenderNode *node;
@@ -1484,20 +1169,6 @@ gtk_snapshot_append_texture (GtkSnapshot            *snapshot,
   graphene_rect_offset_r (bounds, current_state->translate_x, current_state->translate_y, &real_bounds);
   node = gsk_texture_node_new (texture, &real_bounds);
 
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-      char *str;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-
-      gsk_render_node_set_name (node, str);
-
-      g_free (str);
-    }
-
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 }
@@ -1507,8 +1178,6 @@ gtk_snapshot_append_texture (GtkSnapshot            *snapshot,
  * @snapshot: a #GtkSnapshot
  * @color: the #GdkRGBA to draw
  * @bounds: the bounds for the new node
- * @name: (transfer none): a printf() style format string for the name for the new node
- * @...: arguments to insert into the format string
  *
  * Creates a new render node drawing the @color into the given @bounds and appends it
  * to the current render node of @snapshot.
@@ -1518,9 +1187,7 @@ gtk_snapshot_append_texture (GtkSnapshot            *snapshot,
 void
 gtk_snapshot_append_color (GtkSnapshot           *snapshot,
                            const GdkRGBA         *color,
-                           const graphene_rect_t *bounds,
-                           const char            *name,
-                           ...)
+                           const graphene_rect_t *bounds)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GskRenderNode *node;
@@ -1535,20 +1202,6 @@ gtk_snapshot_append_color (GtkSnapshot           *snapshot,
 
   node = gsk_color_node_new (color, &real_bounds);
 
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-      char *str;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-
-      gsk_render_node_set_name (node, str);
-
-      g_free (str);
-    }
-
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 }
@@ -1680,7 +1333,7 @@ gtk_snapshot_render_layout (GtkSnapshot     *snapshot,
   shadows_value = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_TEXT_SHADOW);
   has_shadow = gtk_css_shadows_value_push_snapshot (shadows_value, snapshot);
 
-  gtk_snapshot_append_layout (snapshot, layout, fg_color, "RenderLayout");
+  gtk_snapshot_append_layout (snapshot, layout, fg_color);
 
   if (has_shadow)
     gtk_snapshot_pop (snapshot);
@@ -1705,9 +1358,7 @@ gtk_snapshot_append_linear_gradient (GtkSnapshot            *snapshot,
                                      const graphene_point_t *start_point,
                                      const graphene_point_t *end_point,
                                      const GskColorStop     *stops,
-                                     gsize                   n_stops,
-                                     const char             *name,
-                                     ...)
+                                     gsize                   n_stops)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GskRenderNode *node;
@@ -1733,20 +1384,6 @@ gtk_snapshot_append_linear_gradient (GtkSnapshot            *snapshot,
                                        stops,
                                        n_stops);
 
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-      char *str;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-
-      gsk_render_node_set_name (node, str);
-
-      g_free (str);
-    }
-
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 }
@@ -1768,9 +1405,7 @@ gtk_snapshot_append_repeating_linear_gradient (GtkSnapshot            *snapshot,
                                                const graphene_point_t *start_point,
                                                const graphene_point_t *end_point,
                                                const GskColorStop     *stops,
-                                               gsize                   n_stops,
-                                               const char             *name,
-                                               ...)
+                                               gsize                   n_stops)
 {
   const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
   GskRenderNode *node;
@@ -1796,20 +1431,6 @@ gtk_snapshot_append_repeating_linear_gradient (GtkSnapshot            *snapshot,
                                                  stops,
                                                  n_stops);
 
-  if (name && snapshot->record_names)
-    {
-      va_list args;
-      char *str;
-
-      va_start (args, name);
-      str = g_strdup_vprintf (name, args);
-      va_end (args);
-
-      gsk_render_node_set_name (node, str);
-
-      g_free (str);
-    }
-
   gtk_snapshot_append_node_internal (snapshot, node);
   gsk_render_node_unref (node);
 }
index 577994c1b66695a54380137a59fcf533f92b6c19..97afd4366359d484771682b077ebe15b8cc80884 100644 (file)
@@ -52,9 +52,7 @@ GDK_AVAILABLE_IN_ALL
 GType           gtk_snapshot_get_type                   (void) G_GNUC_CONST;
 
 GDK_AVAILABLE_IN_ALL
-GtkSnapshot *   gtk_snapshot_new                        (gboolean                record_names,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (2, 3);
+GtkSnapshot *   gtk_snapshot_new                        (void);
 GDK_AVAILABLE_IN_ALL
 GskRenderNode * gtk_snapshot_free_to_node               (GtkSnapshot            *snapshot);
 GDK_AVAILABLE_IN_ALL
@@ -68,66 +66,42 @@ GdkPaintable *  gtk_snapshot_to_paintable               (GtkSnapshot
                                                          const graphene_size_t  *size);
 
 GDK_AVAILABLE_IN_ALL
-gboolean        gtk_snapshot_get_record_names           (GtkSnapshot            *snapshot);
-
-GDK_AVAILABLE_IN_ALL
-void            gtk_snapshot_push                       (GtkSnapshot            *snapshot,
-                                                         gboolean                keep_coordinates,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+void            gtk_snapshot_push_debug                 (GtkSnapshot            *snapshot,
+                                                         const char             *message,
+                                                         ...) G_GNUC_PRINTF (2, 3);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_transform             (GtkSnapshot            *snapshot,
-                                                         const graphene_matrix_t*transform,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+                                                         const graphene_matrix_t*transform);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_opacity               (GtkSnapshot            *snapshot,
-                                                         double                  opacity,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+                                                         double                  opacity);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_blur                  (GtkSnapshot            *snapshot,
-                                                         double                  radius,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+                                                         double                  radius);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_color_matrix          (GtkSnapshot            *snapshot,
                                                          const graphene_matrix_t*color_matrix,
-                                                         const graphene_vec4_t  *color_offset,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (4, 5);
+                                                         const graphene_vec4_t  *color_offset);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_repeat                (GtkSnapshot            *snapshot,
                                                          const graphene_rect_t  *bounds,
-                                                         const graphene_rect_t  *child_bounds,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (4, 5);
+                                                         const graphene_rect_t  *child_bounds);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_clip                  (GtkSnapshot            *snapshot,
-                                                         const graphene_rect_t  *bounds,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+                                                         const graphene_rect_t  *bounds);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_rounded_clip          (GtkSnapshot            *snapshot,
-                                                         const GskRoundedRect   *bounds,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+                                                         const GskRoundedRect   *bounds);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_shadow                (GtkSnapshot            *snapshot,
                                                          const GskShadow        *shadow,
-                                                         gsize                   n_shadows,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (4, 5);
+                                                         gsize                   n_shadows);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_blend                 (GtkSnapshot            *snapshot,
-                                                         GskBlendMode            blend_mode,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+                                                         GskBlendMode            blend_mode);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_push_cross_fade            (GtkSnapshot            *snapshot,
-                                                         double                  progress,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (3, 4);
+                                                         double                  progress);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_pop                        (GtkSnapshot            *snapshot);
 
@@ -145,28 +119,34 @@ void            gtk_snapshot_append_node                (GtkSnapshot
                                                          GskRenderNode          *node);
 GDK_AVAILABLE_IN_ALL
 cairo_t *       gtk_snapshot_append_cairo               (GtkSnapshot            *snapshot,
-                                                         const graphene_rect_t  *bounds,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF(3, 4);
+                                                         const graphene_rect_t  *bounds);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_append_texture             (GtkSnapshot            *snapshot,
                                                          GdkTexture             *texture,
-                                                         const graphene_rect_t  *bounds,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (4, 5);
+                                                         const graphene_rect_t  *bounds);
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_append_color               (GtkSnapshot            *snapshot,
                                                          const GdkRGBA          *color,
+                                                         const graphene_rect_t  *bounds);
+GDK_AVAILABLE_IN_ALL
+void            gtk_snapshot_append_linear_gradient     (GtkSnapshot            *snapshot,
                                                          const graphene_rect_t  *bounds,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (4, 5);
+                                                         const graphene_point_t *start_point,
+                                                         const graphene_point_t *end_point,
+                                                         const GskColorStop     *stops,
+                                                         gsize                   n_stops);
+GDK_AVAILABLE_IN_ALL
+void            gtk_snapshot_append_repeating_linear_gradient (GtkSnapshot            *snapshot,
+                                                               const graphene_rect_t  *bounds,
+                                                               const graphene_point_t *start_point,
+                                                               const graphene_point_t *end_point,
+                                                               const GskColorStop     *stops,
+                                                               gsize                   n_stops);
 /* next function implemented in gskpango.c */
 GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_append_layout              (GtkSnapshot            *snapshot,
                                                          PangoLayout            *layout,
-                                                         const GdkRGBA          *color,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (4, 5);
+                                                         const GdkRGBA          *color);
 
 
 GDK_AVAILABLE_IN_ALL
@@ -204,24 +184,6 @@ void            gtk_snapshot_render_insertion_cursor    (GtkSnapshot
                                                          PangoLayout            *layout,
                                                          int                     index,
                                                          PangoDirection          direction);
-GDK_AVAILABLE_IN_ALL
-void            gtk_snapshot_append_linear_gradient     (GtkSnapshot            *snapshot,
-                                                         const graphene_rect_t  *bounds,
-                                                         const graphene_point_t *start_point,
-                                                         const graphene_point_t *end_point,
-                                                         const GskColorStop     *stops,
-                                                         gsize                   n_stops,
-                                                         const char             *name,
-                                                         ...) G_GNUC_PRINTF (7, 8);
-GDK_AVAILABLE_IN_ALL
-void            gtk_snapshot_append_repeating_linear_gradient (GtkSnapshot            *snapshot,
-                                                               const graphene_rect_t  *bounds,
-                                                               const graphene_point_t *start_point,
-                                                               const graphene_point_t *end_point,
-                                                               const GskColorStop     *stops,
-                                                               gsize                   n_stops,
-                                                                const char             *name,
-                                                               ...) G_GNUC_PRINTF (7, 8);
 
 
 G_END_DECLS
index ba134b779e9540e1c8c900634ff7c70639dfce3e..d560bbbbc0c32bd857e82404822b36eb9632cccf 100644 (file)
@@ -27,11 +27,9 @@ typedef struct _GtkSnapshotState GtkSnapshotState;
 typedef GskRenderNode * (* GtkSnapshotCollectFunc) (GtkSnapshot      *snapshot,
                                                     GtkSnapshotState *state,
                                                     GskRenderNode   **nodes,
-                                                    guint             n_nodes,
-                                                    const char       *name);
+                                                    guint             n_nodes);
 
 struct _GtkSnapshotState {
-  char                  *name;
   guint                  start_node_index;
   guint                  n_nodes;
 
@@ -76,6 +74,9 @@ struct _GtkSnapshotState {
       double progress;
       GskRenderNode *start_node;
     } cross_fade;
+    struct {
+      char *message;
+    } debug;
   } data;
 };
 
@@ -96,9 +97,6 @@ struct _GtkSnapshotClass {
   GObjectClass           parent_class; /* it's really GdkSnapshotClass, but don't tell anyone! */
 };
 
-GtkSnapshot *           gtk_snapshot_new_child                  (GtkSnapshot            *parent,
-                                                                 const char             *name,
-                                                                 ...) G_GNUC_PRINTF (2, 3);
 void                    gtk_snapshot_append_node_internal       (GtkSnapshot            *snapshot,
                                                                  GskRenderNode          *node);
 
index 34f5491c4828258a44c925d70f9b45ab46d83555..05cf9e785d86f254cf330e689d1a538cb24dd5fd 100644 (file)
@@ -1787,7 +1787,7 @@ gtk_stack_snapshot_crossfade (GtkWidget   *widget,
   GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
   gdouble progress = gtk_progress_tracker_get_progress (&priv->tracker, FALSE);
 
-  gtk_snapshot_push_cross_fade (snapshot, progress, "CrossFade<%g>", progress);
+  gtk_snapshot_push_cross_fade (snapshot, progress);
 
   if (priv->last_visible_node)
     {
@@ -1849,9 +1849,7 @@ gtk_stack_snapshot_under (GtkWidget   *widget,
       g_assert_not_reached ();
     }
 
-  gtk_snapshot_push_clip (snapshot,
-                          &GRAPHENE_RECT_INIT(x, y, width, height),
-                          "StackUnder");
+  gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_INIT(x, y, width, height));
 
   gtk_widget_snapshot_child (widget,
                              priv->visible_child->widget,
@@ -1946,8 +1944,7 @@ gtk_stack_snapshot (GtkWidget   *widget,
 
               gtk_widget_get_allocation (priv->last_visible_child->widget,
                                          &priv->last_visible_surface_allocation);
-              last_visible_snapshot = gtk_snapshot_new (gtk_snapshot_get_record_names (snapshot),
-                                                        "StackCaptureLastVisibleChild");
+              last_visible_snapshot = gtk_snapshot_new ();
               gtk_widget_snapshot (priv->last_visible_child->widget, last_visible_snapshot);
               priv->last_visible_node = gtk_snapshot_free_to_node (last_visible_snapshot);
             }
@@ -1957,8 +1954,7 @@ gtk_stack_snapshot (GtkWidget   *widget,
                                       0, 0,
                                       gtk_widget_get_width (widget),
                                       gtk_widget_get_height (widget)
-                                  ),
-                                  "StackAnimationClip");
+                                  ));
 
           switch (priv->active_transition_type)
             {
index 5ea19b3d7b17cfe43294ea02634b3268e0c29ff1..0afecc4c4653e65cf92e00ed23dc5ee349c9e060 100644 (file)
@@ -1795,9 +1795,7 @@ snapshot_insertion_cursor (GtkSnapshot     *snapshot,
   cairo_t *cr;
   
   get_insertion_cursor_bounds (height, direction, draw_arrow, &bounds);
-  cr = gtk_snapshot_append_cairo (snapshot,
-                                  &bounds,
-                                  "%s Cursor", is_primary ? "Primary" : "Secondary");
+  cr = gtk_snapshot_append_cairo (snapshot, &bounds);
 
   draw_insertion_cursor (context, cr, 0, 0, height, is_primary, direction, draw_arrow);
 
index a636c0ce199a0274cd5f7f5f0b711ede414f250b..0298f88f037dd8008c7cb16995d4720219155f59 100644 (file)
@@ -226,12 +226,12 @@ gtk_text_util_create_drag_icon (GtkWidget *widget,
 
   limit_layout_lines (layout);
 
-  snapshot = gtk_snapshot_new (FALSE, "TextDragIcon");
+  snapshot = gtk_snapshot_new ();
 
   style_context = gtk_widget_get_style_context (widget);
   gtk_style_context_get_color (style_context,
                                &color);
-  gtk_snapshot_append_layout (snapshot, layout, &color, "TextDragIcon");
+  gtk_snapshot_append_layout (snapshot, layout, &color);
 
   paintable = gtk_snapshot_free_to_paintable (snapshot, NULL);
   g_object_unref (layout);
@@ -332,10 +332,9 @@ gtk_text_util_create_rich_drag_icon (GtkWidget     *widget,
   layout_width = MIN (layout_width, DRAG_ICON_MAX_WIDTH);
   layout_height = MIN (layout_height, DRAG_ICON_MAX_HEIGHT);
 
-  snapshot = gtk_snapshot_new (FALSE, "RichTextDragIcon");
+  snapshot = gtk_snapshot_new ();
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &GRAPHENE_RECT_INIT (0, 0, layout_width, layout_height),
-                                  "Text");
+                                  &GRAPHENE_RECT_INIT (0, 0, layout_width, layout_height));
 
   gtk_text_layout_draw (layout, widget, cr);
 
index 77055a9cbf734a5641067ea996750a52876eaf5d..193c9a97947d5e3b1458e2a89ddd2e88b1f5523f 100644 (file)
@@ -5432,9 +5432,9 @@ gtk_text_view_snapshot (GtkWidget   *widget,
                       gtk_widget_get_width (widget),
                       gtk_widget_get_height (widget));
 
-  gtk_snapshot_push_clip (snapshot, &bounds, "Textview Clip");
+  gtk_snapshot_push_clip (snapshot, &bounds);
 
-  cr = gtk_snapshot_append_cairo (snapshot, &bounds, "GtkTextView");
+  cr = gtk_snapshot_append_cairo (snapshot, &bounds);
 
   context = gtk_widget_get_style_context (widget);
 
index 4de024e1f0081dd19b15543c3b594838b37ddfc9..a00c0bd4dd821382a3fe19431111323dd78a282c 100644 (file)
@@ -4441,8 +4441,7 @@ gtk_tree_view_snapshot_line (GtkTreeView         *tree_view,
                                      MIN (y1, y2),
                                      ABS (x2 - x1) + 1,
                                      ABS (y2 - y1) + 1
-                                  ),
-                                  "TreeViewGridLine");
+                                  ));
 
   context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
 
@@ -4840,8 +4839,7 @@ gtk_tree_view_bin_snapshot (GtkWidget   *widget,
                                                  cell_area.y + cell_area.height / 2,
                                                  cell_area.x + cell_area.width,
                                                  1
-                                             ),
-                                             "Separator");
+                                             ));
 
                   gtk_style_context_restore (context);
                 }
@@ -4881,8 +4879,7 @@ gtk_tree_view_bin_snapshot (GtkWidget   *widget,
                                                  cell_area.y + cell_area.height / 2,
                                                  cell_area.x + cell_area.width,
                                                  1
-                                             ),
-                                             "Separator");
+                                             ));
 
                   gtk_style_context_restore (context);
                 }
@@ -5144,8 +5141,7 @@ gtk_tree_view_snapshot (GtkWidget   *widget,
                               0, gtk_tree_view_get_effective_header_height (tree_view),
                               width,
                               height - gtk_tree_view_get_effective_header_height (tree_view)
-                          ),
-                          "TreeViewContentClip");
+                          ));
 
   gtk_snapshot_offset (snapshot,
                        - (gint) gtk_adjustment_get_value (tree_view->priv->hadjustment),
@@ -5201,8 +5197,7 @@ gtk_tree_view_snapshot (GtkWidget   *widget,
                               0, 0,
                               width,
                               gtk_tree_view_get_effective_header_height (tree_view)
-                          ),
-                          "TreeViewHeaderClip");
+                          ));
 
   gtk_style_context_save (context);
   gtk_style_context_remove_class (context, GTK_STYLE_CLASS_VIEW);
@@ -13709,7 +13704,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView  *tree_view,
 
   bin_window_width = gtk_widget_get_width (GTK_WIDGET (tree_view));
 
-  snapshot = gtk_snapshot_new (FALSE, "TreeView DragIcon");
+  snapshot = gtk_snapshot_new ();
 
   gtk_snapshot_render_background (snapshot, context,
                                   0, 0,
@@ -13769,8 +13764,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView  *tree_view,
                                              cell_area.y + cell_area.height / 2,
                                              cell_area.x + cell_area.width,
                                              1
-                                         ),
-                                         "Separator");
+                                         ));
 
               gtk_style_context_restore (context);
             }
index fdbfc8a3bfb7cbef2af8a31e15967fb7b53140df..166ec771c111b3c8488242d67c752a1882479d2c 100644 (file)
@@ -513,8 +513,7 @@ gtk_viewport_snapshot (GtkWidget   *widget,
                           &GRAPHENE_RECT_INIT(
                             0, 0,
                             gtk_widget_get_width (widget),
-                            gtk_widget_get_height (widget)),
-                            "Viewport");
+                            gtk_widget_get_height (widget)));
 
   GTK_WIDGET_CLASS (gtk_viewport_parent_class)->snapshot (widget, snapshot);
 
index 30e43d4ac828e75d359e69ce06eba2896bf68a5c..08c5db9beddf88a0870490b1bf8c7232dc0c30ac 100644 (file)
@@ -13037,48 +13037,50 @@ gtk_widget_maybe_add_debug_render_nodes (GtkWidget             *widget,
       get_box_border (style, &border);
       get_box_padding (style, &padding);
 
+      gtk_snapshot_push_debug (snapshot, "Widget layout debugging");
+
       /* Widget margins */
       graphene_rect_init (&bounds,
                           0, -priv->margin.top,
                           priv->allocation.width, priv->margin.top);
-      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds, "Widget margin top");
+      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds);
 
       graphene_rect_init (&bounds,
                           0, priv->allocation.height,
                           priv->allocation.width, priv->margin.bottom);
-      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds, "Widget margin bottom");
+      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds);
 
       graphene_rect_init (&bounds,
                           -priv->margin.left, 0,
                           priv->margin.left, priv->allocation.height);
-      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds, "Widget margin left");
+      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds);
 
       graphene_rect_init (&bounds,
                           priv->allocation.width, 0,
                           priv->margin.right, priv->allocation.height);
-      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds, "Widget margin right");
+      gtk_snapshot_append_color (snapshot, &widget_margin_color, &bounds);
 
 
       /* CSS Margins */
       graphene_rect_init (&bounds,
                           0, 0,
                           priv->allocation.width, margin.top);
-      gtk_snapshot_append_color (snapshot, &margin_color, &bounds, "Margin top");
+      gtk_snapshot_append_color (snapshot, &margin_color, &bounds);
 
       graphene_rect_init (&bounds,
                           0, priv->allocation.height - margin.bottom,
                           priv->allocation.width, margin.bottom);
-      gtk_snapshot_append_color (snapshot, &margin_color, &bounds, "Margin bottom");
+      gtk_snapshot_append_color (snapshot, &margin_color, &bounds);
 
       graphene_rect_init (&bounds,
                           0, margin.top,
                           margin.left, priv->allocation.height - margin.top - margin.bottom);
-      gtk_snapshot_append_color (snapshot, &margin_color, &bounds, "Margin left");
+      gtk_snapshot_append_color (snapshot, &margin_color, &bounds);
 
       graphene_rect_init (&bounds,
                           priv->allocation.width - margin.right, margin.top,
                           margin.right, priv->allocation.height - margin.top - margin.bottom);
-      gtk_snapshot_append_color (snapshot, &margin_color, &bounds, "Margin right");
+      gtk_snapshot_append_color (snapshot, &margin_color, &bounds);
 
 
       /* Padding */
@@ -13087,28 +13089,30 @@ gtk_widget_maybe_add_debug_render_nodes (GtkWidget             *widget,
                           margin.top + border.top,
                           priv->allocation.width - margin.left - margin.right - border.left - border.right,
                           padding.top);
-      gtk_snapshot_append_color (snapshot, &padding_color, &bounds, "Padding top");
+      gtk_snapshot_append_color (snapshot, &padding_color, &bounds);
 
       graphene_rect_init (&bounds,
                           margin.left + border.left,
                           priv->allocation.height - margin.bottom - border.bottom - padding.bottom,
                           priv->allocation.width - margin.left - margin.right - border.left - border.right,
                           padding.bottom);
-      gtk_snapshot_append_color (snapshot, &padding_color, &bounds, "Padding bottom");
+      gtk_snapshot_append_color (snapshot, &padding_color, &bounds);
 
       graphene_rect_init (&bounds,
                           margin.left + border.left,
                           margin.top + border.top + padding.top,
                           padding.left,
                           priv->allocation.height - margin.top - margin.bottom - border.top - border.bottom - padding.top - padding.bottom);
-      gtk_snapshot_append_color (snapshot, &padding_color, &bounds, "Padding left");
+      gtk_snapshot_append_color (snapshot, &padding_color, &bounds);
 
       graphene_rect_init (&bounds,
                           priv->allocation.width - margin.right - border.right - padding.right,
                           margin.top + border.top + padding.top,
                           padding.right,
                           priv->allocation.height - margin.top - margin.bottom - border.top - border.bottom - padding.top - padding.bottom);
-      gtk_snapshot_append_color (snapshot, &padding_color, &bounds, "Padding right");
+      gtk_snapshot_append_color (snapshot, &padding_color, &bounds);
+
+      gtk_snapshot_pop (snapshot);
     }
 
   if (GTK_DISPLAY_DEBUG_CHECK (display, BASELINES))
@@ -13133,8 +13137,7 @@ gtk_widget_maybe_add_debug_render_nodes (GtkWidget             *widget,
                               priv->allocation.width, 1);
           gtk_snapshot_append_color (snapshot,
                                      &red,
-                                     &bounds,
-                                     "Baseline Debug");
+                                     &bounds);
         }
     }
 
@@ -13150,8 +13153,7 @@ gtk_widget_maybe_add_debug_render_nodes (GtkWidget             *widget,
 
       gtk_snapshot_append_color (snapshot,
                                  &blue,
-                                 &bounds,
-                                 "Baseline Debug");
+                                 &bounds);
       priv->highlight_resize = FALSE;
       gtk_widget_queue_draw (widget);
     }
@@ -13171,7 +13173,13 @@ gtk_widget_create_render_node (GtkWidget   *widget,
   GtkBorder margin, border, padding;
   GtkSnapshot *snapshot;
 
-  snapshot = gtk_snapshot_new_child (parent_snapshot, "%s<%p>", gtk_widget_get_name (widget), widget);
+  snapshot = gtk_snapshot_new ();
+
+  _gtk_widget_get_allocation (widget, &allocation);
+  gtk_snapshot_push_debug (snapshot,
+                           "RenderNode for %s %p @ %d x %d",
+                           G_OBJECT_TYPE_NAME (widget), widget,
+                           allocation.width, allocation.height);
 
   filter_value = _gtk_style_context_peek_property (_gtk_widget_get_style_context (widget), GTK_CSS_PROPERTY_FILTER);
   gtk_css_filter_value_push_snapshot (filter_value, snapshot);
@@ -13182,10 +13190,8 @@ gtk_widget_create_render_node (GtkWidget   *widget,
   get_box_padding (style, &padding);
   opacity = priv->alpha / 255.0;
 
-  _gtk_widget_get_allocation (widget, &allocation);
-
   if (opacity < 1.0)
-    gtk_snapshot_push_opacity (snapshot, opacity, "Opacity<%s,%f>", G_OBJECT_TYPE_NAME (widget), opacity);
+    gtk_snapshot_push_opacity (snapshot, opacity);
 
   if (!GTK_IS_WINDOW (widget))
     {
@@ -13221,6 +13227,8 @@ gtk_widget_create_render_node (GtkWidget   *widget,
   gtk_widget_maybe_add_debug_render_nodes (widget, snapshot);
 #endif
 
+  gtk_snapshot_pop (snapshot);
+
   return gtk_snapshot_free_to_node (snapshot);
 }
 
@@ -13261,14 +13269,6 @@ gtk_widget_snapshot (GtkWidget   *widget,
     gtk_snapshot_append_node (snapshot, priv->render_node);
 }
 
-static gboolean
-should_record_names (GtkWidget   *widget,
-                     GskRenderer *renderer)
-{
-  return gtk_inspector_is_recording (widget) ||
-         ((gsk_renderer_get_debug_flags (renderer) & GSK_DEBUG_ANY)  != 0);
-}
-
 void
 gtk_widget_render (GtkWidget            *widget,
                    GdkSurface            *surface,
@@ -13286,8 +13286,7 @@ gtk_widget_render (GtkWidget            *widget,
   if (renderer == NULL)
     return;
 
-  snapshot = gtk_snapshot_new (should_record_names (widget, renderer),
-                               "Render<%s>", G_OBJECT_TYPE_NAME (widget));
+  snapshot = gtk_snapshot_new ();
   gtk_widget_snapshot (widget, snapshot);
   root = gtk_snapshot_free_to_node (snapshot);
 
index 81512cb437820b12d2c58b1e87fca3841a0cd9b8..d15b1cee4baf3ad13e0500c5d0920e399fe2c36e 100644 (file)
@@ -100,18 +100,12 @@ gtk_widget_paintable_paintable_snapshot (GdkPaintable *paintable,
 
   /* need to clip because widgets may draw out of bounds */
   gtk_snapshot_push_clip (snapshot,
-                          &GRAPHENE_RECT_INIT(0, 0, width, height),
-                          "WidgetPaintableClip<%g,%g>",
-                          width, height);
+                          &GRAPHENE_RECT_INIT(0, 0, width, height));
   graphene_matrix_init_scale (&transform,
                               width / gtk_widget_get_allocated_width (self->widget),
                               height / gtk_widget_get_allocated_height (self->widget),
                               1.0);
-  gtk_snapshot_push_transform (snapshot,
-                               &transform,
-                               "WidgetPaintableScale<%g,%g>",
-                               width / gtk_widget_get_allocated_width (self->widget),
-                               height / gtk_widget_get_allocated_height (self->widget));
+  gtk_snapshot_push_transform (snapshot, &transform);
 
   gtk_widget_snapshot (self->widget, snapshot);
 
@@ -136,7 +130,7 @@ gtk_widget_paintable_paintable_get_current_image (GdkPaintable *paintable)
   if (width == 0 || height == 0)
     return gdk_paintable_new_empty (width, height);
 
-  snapshot = gtk_snapshot_new (FALSE, "WidgetPaintableCurrentImage");
+  snapshot = gtk_snapshot_new ();
   gdk_paintable_snapshot (GDK_PAINTABLE (self), 
                           snapshot,
                           width, height);
index a8ef6694872cf4c93342ff1fea6d9e86c5783821..e8570fb7fbd845cf01f73f4dacfb75b3e2badb1f 100644 (file)
@@ -202,8 +202,7 @@ gtk_cell_renderer_graph_snapshot (GtkCellRenderer      *cell,
                                   &GRAPHENE_RECT_INIT (
                                       background_area->x, background_area->y,
                                       background_area->width, background_area->height
-                                  ),
-                                  "CellGraph");
+                                  ));
 
   cairo_set_line_width (cr, 1.0);
 
index a3764099af58e14beb00445a2a62ad2860c68407..07ff181dd3c986e371981be05486befb3e4ad2dc 100644 (file)
@@ -217,15 +217,13 @@ gtk_fps_overlay_snapshot (GtkInspectorOverlay *overlay,
 
   gtk_snapshot_offset (snapshot, bounds.origin.x + bounds.size.width - width, bounds.origin.y);
   if (overlay_opacity < 1.0)
-    gtk_snapshot_push_opacity (snapshot, overlay_opacity, "Fps Overlay Opacity: %g", overlay_opacity);
+    gtk_snapshot_push_opacity (snapshot, overlay_opacity);
   gtk_snapshot_append_color (snapshot,
                              &(GdkRGBA) { 0, 0, 0, 0.5 },
-                             &GRAPHENE_RECT_INIT (-1, -1, width + 2, height + 2),
-                             "Fps Overlay background");
+                             &GRAPHENE_RECT_INIT (-1, -1, width + 2, height + 2));
   gtk_snapshot_append_layout (snapshot,
                               layout,
-                              &(GdkRGBA) { 1, 1, 1, 1 },
-                              "Fps Overlay: %s", fps_string);
+                              &(GdkRGBA) { 1, 1, 1, 1 });
   if (overlay_opacity < 1.0)
     gtk_snapshot_pop (snapshot);
   gtk_snapshot_offset (snapshot, - bounds.origin.x - bounds.size.width + width, - bounds.origin.y);
index c45220bc0efb6dec57a7eeb9ac2ea89f81df28be..24874da93b1eff476fd87fc8e226a1b361713926 100644 (file)
@@ -53,8 +53,7 @@ gtk_highlight_overlay_snapshot (GtkInspectorOverlay *overlay,
 
   gtk_snapshot_append_color (snapshot,
                              &self->color,
-                             &bounds,
-                             "InspectorHighlight");
+                             &bounds);
 }
 
 static void
index 9b9678d0ae0d520f1315ee80cd0f4f896cd4a846..a95c9bc8146934e827ea818af05eefaea28f9443 100644 (file)
@@ -62,7 +62,11 @@ gtk_inspector_overlay_snapshot (GtkInspectorOverlay *self,
                                 GskRenderNode       *node,
                                 GtkWidget           *widget)
 {
+  gtk_snapshot_push_debug (snapshot, "%s %p", G_OBJECT_TYPE_NAME (self), self);
+
   GTK_INSPECTOR_OVERLAY_GET_CLASS (self)->snapshot (self, snapshot, node, widget);
+
+  gtk_snapshot_pop (snapshot);
 }
 
 void
index d98f86037bcb828839572e3e47831c5530fd8f7c..1dbbbdb52a2d728c2d2203502af2a3d17b0d1d6f 100644 (file)
@@ -226,8 +226,7 @@ gtk_render_node_view_snapshot (GtkWidget   *widget,
 
   graphene_rect_init (&rect, 0, 0, width, height);
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &rect,
-                                  "RenderNodeView");
+                                  &rect);
 
   cairo_translate (cr, width / 2.0, height / 2.0);
   if (width < viewport.width || height < viewport.height)
index 59cf9fe3ea201588273b25236cede7a4d0ea0b8b..9a5d3069b7e3ca15e99173b3bdcd99f2ba8398ec 100644 (file)
@@ -227,8 +227,7 @@ gtk_updates_overlay_snapshot (GtkInspectorOverlay *overlay,
           cairo_region_get_rectangle (draw->region, i, &rect);
           gtk_snapshot_append_color (snapshot,
                                      &(GdkRGBA) { 1, 0, 0, 0.4 * (1 - progress) },
-                                     &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height),
-                                     "Debug Updates<%g>", progress);
+                                     &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height));
         }
     }
 }
index adc55fcf1f7a60940aac148ea905dad73984587b..03273e82b9f1e224f89b2d3ffe2d1280b2bf90a8 100644 (file)
@@ -422,7 +422,7 @@ gtk_inspector_prepare_render (GtkWidget            *widget,
       GtkSnapshot *snapshot;
       GList *l;
 
-      snapshot = gtk_snapshot_new (FALSE, "Inspector Overlay");
+      snapshot = gtk_snapshot_new ();
       gtk_snapshot_append_node (snapshot, node);
 
       for (l = iw->overlays; l; l = l->next)
index 3efc1a0daf3363c41287b3a3bc535bb60c726466..d3d7d82fd2bb9474453f69821ed2c6e1cafdcdb6 100644 (file)
@@ -73,8 +73,7 @@ gtk_node_view_snapshot (GtkWidget   *widget,
       gtk_snapshot_push_clip (snapshot,
                               &GRAPHENE_RECT_INIT (
                                 0, 0,
-                                gtk_widget_get_width (widget), gtk_widget_get_height (widget)),
-                              "nodeview clip");
+                                gtk_widget_get_width (widget), gtk_widget_get_height (widget)));
       gtk_snapshot_append_node (snapshot, self->node);
       gtk_snapshot_pop (snapshot);
     }
index 5540d6d76059e45ef05b63503d665eeed3023cd1..bbbf888da5c2154da95af901c5f43723d5ce82e7 100644 (file)
@@ -27,7 +27,7 @@ snapshot_blur (GtkWidget   *widget,
 {
   GtkBlurBox *box = (GtkBlurBox *) widget;
 
-  gtk_snapshot_push_blur (snapshot, box->radius, "blur");
+  gtk_snapshot_push_blur (snapshot, box->radius);
 
   GTK_WIDGET_CLASS (gtk_blur_box_parent_class)->snapshot (widget, snapshot);
 
index 5b124c94bc1fcce0407348497fa1c58c0560690b..be8400d978dbcfc6136dd87652f66c4ba0d0b639 100644 (file)
@@ -69,7 +69,7 @@ gtk_texture_view_snapshot (GtkWidget   *widget,
       bounds.size.width = MIN (width, gdk_texture_get_width (self->texture));
       bounds.size.height = MIN (height, gdk_texture_get_height (self->texture));
 
-      gtk_snapshot_append_texture (snapshot, self->texture, &bounds, "Texture");
+      gtk_snapshot_append_texture (snapshot, self->texture, &bounds);
     }
 }
 
index a0a196a50ab9871417ba10626ddca3a83ef324f0..fc76ed22357a99e6d159c1fc19f9327bc6857c05 100644 (file)
@@ -174,8 +174,7 @@ gtk_focus_widget_snapshot (GtkWidget *widget, GtkSnapshot *snapshot)
       bounds.size.height = alloc.height;
       gtk_snapshot_append_color (snapshot,
                                  &black,
-                                 &bounds,
-                                 "Crosshair 1");
+                                 &bounds);
 
       bounds.origin.x = -30;
       bounds.origin.y = self->mouse_y;
@@ -183,8 +182,7 @@ gtk_focus_widget_snapshot (GtkWidget *widget, GtkSnapshot *snapshot)
       bounds.size.height = 1;
       gtk_snapshot_append_color (snapshot,
                                  &black,
-                                 &bounds,
-                                 "Crosshair 2");
+                                 &bounds);
 
       layout = gtk_widget_create_pango_layout (widget, NULL);
       text = g_strdup_printf ("%.2f×%.2f", self->mouse_x, self->mouse_y);