rendernode: Remove the renderer from the rendernode

This commit is contained in:
Benjamin Otte 2016-11-01 05:47:35 +01:00
parent a0e63b8a07
commit 4129b70b96
3 changed files with 3 additions and 12 deletions

View File

@ -623,7 +623,6 @@ gsk_renderer_render (GskRenderer *renderer,
g_return_if_fail (context == NULL || GDK_IS_DRAWING_CONTEXT (context));
g_return_if_fail (priv->drawing_context == NULL);
g_return_if_fail (priv->root_node == NULL);
g_return_if_fail (root->renderer == renderer);
if (context != NULL)
priv->drawing_context = g_object_ref (context);
@ -683,7 +682,7 @@ gsk_renderer_create_render_node (GskRenderer *renderer)
{
g_return_val_if_fail (GSK_IS_RENDERER (renderer), NULL);
return gsk_render_node_new (renderer);
return gsk_render_node_new ();
}
/*< private >

View File

@ -247,17 +247,13 @@ gsk_render_node_get_type (void)
* gsk_render_node_new:
* @renderer: a #GskRenderer
*
* Creates a new #GskRenderNode, to be used with a #GskRenderer.
*
* Returns: (transfer full): the newly created #GskRenderNode
*/
GskRenderNode *
gsk_render_node_new (GskRenderer *renderer)
gsk_render_node_new (void)
{
GskRenderNode *res = (GskRenderNode *) g_type_create_instance (GSK_TYPE_RENDER_NODE);
res->renderer = renderer;
return res;
}

View File

@ -2,7 +2,6 @@
#define __GSK_RENDER_NODE_PRIVATE_H__
#include "gskrendernode.h"
#include "gskrenderer.h"
#include <cairo.h>
G_BEGIN_DECLS
@ -17,9 +16,6 @@ struct _GskRenderNode
volatile int ref_count;
/* Back pointer to the renderer that created the node */
GskRenderer *renderer;
/* The graph */
GskRenderNode *parent;
GskRenderNode *first_child;
@ -77,7 +73,7 @@ struct _GskRenderNodeClass
void (* finalize) (GskRenderNode *node);
};
GskRenderNode *gsk_render_node_new (GskRenderer *renderer);
GskRenderNode *gsk_render_node_new (void);
void gsk_render_node_make_immutable (GskRenderNode *node);