[gtk+/wip/otte/rendernode: 3/3] Call gsk_render_node_draw() instead of creating fallback renderers
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/rendernode: 3/3] Call gsk_render_node_draw() instead of creating fallback renderers
- Date: Tue, 13 Dec 2016 02:21:13 +0000 (UTC)
commit e1717cefa79f9d2d018fe753814c59db55f490d8
Author: Benjamin Otte <otte redhat com>
Date: Tue Dec 13 03:15:07 2016 +0100
Call gsk_render_node_draw() instead of creating fallback renderers
gsk/gskvulkanrenderpass.c | 7 +------
gtk/inspector/rendernodeview.c | 8 +-------
2 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/gsk/gskvulkanrenderpass.c b/gsk/gskvulkanrenderpass.c
index 595ad63..62af7e3 100644
--- a/gsk/gskvulkanrenderpass.c
+++ b/gsk/gskvulkanrenderpass.c
@@ -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);
diff --git a/gtk/inspector/rendernodeview.c b/gtk/inspector/rendernodeview.c
index 423be83..7db9001 100644
--- a/gtk/inspector/rendernodeview.c
+++ b/gtk/inspector/rendernodeview.c
@@ -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_rendernode_draw (priv->render_node, cr);
if (priv->render_region)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]