Call gsk_render_node_draw() instead of creating fallback renderers

This commit is contained in:
Benjamin Otte 2016-12-13 03:15:07 +01:00
parent e82d02432e
commit 361e2cda27
2 changed files with 2 additions and 13 deletions

View File

@ -141,7 +141,6 @@ gsk_vulkan_render_pass_upload_fallback (GskVulkanRenderPass *self,
VkCommandBuffer command_buffer)
{
graphene_rect_t bounds;
GskRenderer *fallback;
cairo_surface_t *surface;
cairo_t *cr;
@ -153,11 +152,7 @@ gsk_vulkan_render_pass_upload_fallback (GskVulkanRenderPass *self,
cr = cairo_create (surface);
cairo_translate (cr, bounds.origin.x, bounds.origin.y);
fallback = gsk_renderer_create_fallback (gsk_vulkan_render_get_renderer (render),
&bounds,
cr);
gsk_renderer_render (fallback, op->node, NULL);
g_object_unref (fallback);
gsk_render_node_draw (op->node, cr);
cairo_destroy (cr);

View File

@ -225,7 +225,6 @@ gtk_render_node_view_snapshot (GtkWidget *widget,
GtkRenderNodeViewPrivate *priv = gtk_render_node_view_get_instance_private (view);
GdkRectangle viewport;
graphene_rect_t rect;
GskRenderer *fallback;
int width, height;
cairo_t *cr;
@ -249,12 +248,7 @@ gtk_render_node_view_snapshot (GtkWidget *widget,
}
cairo_translate (cr, - viewport.x - viewport.width / 2.0, - viewport.y - viewport.height / 2.0);
fallback = gsk_renderer_create_fallback (gtk_snapshot_get_renderer (snapshot),
&GRAPHENE_RECT_INIT (viewport.x, viewport.y,
viewport.width, viewport.height),
cr);
gsk_renderer_render (fallback, priv->render_node, NULL);
g_object_unref (fallback);
gsk_render_node_draw (priv->render_node, cr);
if (priv->render_region)
{