cairo_save (cr);
clip = cairo_region_create_rectangle (&(cairo_rectangle_int_t) { 0, 0, width, height });
- snapshot = gtk_snapshot_new (NULL, FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
+ snapshot = gtk_snapshot_new (FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
gtk_css_image_snapshot (image, snapshot, width, height);
node = gtk_snapshot_free_to_node (snapshot);
rect.width,
rect.height);
- snapshot = gtk_snapshot_new (NULL, FALSE, NULL, "IconView DragIcon");
+ snapshot = gtk_snapshot_new (FALSE, NULL, "IconView DragIcon");
gtk_icon_view_snapshot_item (icon_view, snapshot, item,
icon_view->priv->item_padding,
icon_view->priv->item_padding,
g_signal_handler_block (priv->inspected, priv->draw_handler);
- inspected_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
- gtk_snapshot_get_record_names (snapshot),
+ inspected_snapshot = gtk_snapshot_new (gtk_snapshot_get_record_names (snapshot),
NULL,
"MagnifierSnapshot");
{
GtkSnapshot *child_snapshot;
- child_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
- gtk_snapshot_get_record_names (snapshot),
+ child_snapshot = gtk_snapshot_new (gtk_snapshot_get_record_names (snapshot),
NULL,
"OverlayCaptureMainChild");
gtk_snapshot_offset (child_snapshot, main_alloc.x, main_alloc.y);
/**
* gtk_snapshot_new:
- * @renderer: the #GskRenderer to create nodes for
* @record_names: whether to keep node names (for debugging purposes)
* @clip: (nullable): the clip region to use, or %NULL
* @name: a printf-style format string to create the node name
* Returns: a newly-allocated #GtkSnapshot
*/
GtkSnapshot *
-gtk_snapshot_new (GskRenderer *renderer,
- gboolean record_names,
+gtk_snapshot_new (gboolean record_names,
const cairo_region_t *clip,
const char *name,
...)
snapshot = g_object_new (GTK_TYPE_SNAPSHOT, NULL);
snapshot->record_names = record_names;
- snapshot->renderer = renderer;
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_get_renderer:
- * @snapshot: a #GtkSnapshot
- *
- * Obtains the #GskRenderer that this snapshot will be
- * rendered with.
- *
- * Returns: (transfer none): the #GskRenderer
- */
-GskRenderer *
-gtk_snapshot_get_renderer (GtkSnapshot *snapshot)
-{
- return snapshot->renderer;
-}
-
/**
* gtk_snapshot_get_record_names:
* @snapshot: a #GtkSnapshot
GType gtk_snapshot_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
-GtkSnapshot * gtk_snapshot_new (GskRenderer *renderer,
- gboolean record_names,
+GtkSnapshot * gtk_snapshot_new (gboolean record_names,
const cairo_region_t *clip,
const char *name,
- ...) G_GNUC_PRINTF (4, 5);
+ ...) G_GNUC_PRINTF (3, 4);
GDK_AVAILABLE_IN_ALL
GskRenderNode * gtk_snapshot_free_to_node (GtkSnapshot *snapshot);
GDK_AVAILABLE_IN_ALL
GskRenderNode * gtk_snapshot_to_node (GtkSnapshot *snapshot);
-GDK_AVAILABLE_IN_ALL
-GskRenderer * gtk_snapshot_get_renderer (GtkSnapshot *snapshot);
GDK_AVAILABLE_IN_ALL
gboolean gtk_snapshot_get_record_names (GtkSnapshot *snapshot);
GObject parent_instance; /* it's really GdkSnapshot, but don't tell anyone! */
gboolean record_names;
- GskRenderer *renderer;
GArray *state_stack;
GPtrArray *nodes;
};
gtk_widget_get_allocation (priv->last_visible_child->widget,
&priv->last_visible_surface_allocation);
- last_visible_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
- gtk_snapshot_get_record_names (snapshot),
+ last_visible_snapshot = gtk_snapshot_new (gtk_snapshot_get_record_names (snapshot),
NULL,
"StackCaptureLastVisibleChild");
gtk_widget_snapshot (priv->last_visible_child->widget, last_visible_snapshot);
bin_window_width + 2,
background_area.height + 2);
- snapshot = gtk_snapshot_new (NULL, FALSE, NULL, "TreeView DragIcon");
+ snapshot = gtk_snapshot_new (FALSE, NULL, "TreeView DragIcon");
gtk_snapshot_render_background (snapshot, context,
0, 0,
if (mode == RENDER_SNAPSHOT)
{
- GskRenderer *renderer = gtk_widget_get_renderer (widget);
GtkSnapshot *snapshot;
cairo_region_t *clip;
GskRenderNode *node;
widget->priv->clip.y - widget->priv->allocation.y,
widget->priv->clip.width,
widget->priv->clip.height});
- snapshot = gtk_snapshot_new (renderer, FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (widget));
+ snapshot = gtk_snapshot_new (FALSE, clip, "Fallback<%s>", G_OBJECT_TYPE_NAME (widget));
gtk_widget_snapshot (widget, snapshot);
node = gtk_snapshot_free_to_node (snapshot);
if (node != NULL)
context = gsk_renderer_begin_draw_frame (renderer, region);
clip = gdk_drawing_context_get_clip (context);
- snapshot = gtk_snapshot_new (renderer,
- should_record_names (widget, renderer),
+ snapshot = gtk_snapshot_new (should_record_names (widget, renderer),
clip,
"Render<%s>", G_OBJECT_TYPE_NAME (widget));
cairo_region_destroy (clip);