gsk: Move GskRenderNode getters to internal API

GskRenderNode is, at its core, a write-only API; you're supposed to set
up the render nodes instead of querying them for state.

Querying render nodes is left to the GskRenderer implementation.
This commit is contained in:
Emmanuele Bassi 2016-08-24 14:07:26 +01:00
parent 7de49fb7b2
commit 3aaae6c49c
3 changed files with 6 additions and 13 deletions

View File

@ -1287,7 +1287,7 @@ gsk_render_node_get_world_matrix (GskRenderNode *node,
*mv = node->world_matrix;
}
/**
/*
* gsk_render_node_get_scale_factor:
* @node: a #GskRenderNode
*
@ -1296,8 +1296,6 @@ gsk_render_node_get_world_matrix (GskRenderNode *node,
* See also: gsk_renderer_get_scale_factor()
*
* Returns: the scale factor
*
* Since: 3.22
*/
int
gsk_render_node_get_scale_factor (GskRenderNode *node)
@ -1353,15 +1351,13 @@ gsk_render_node_set_blend_mode (GskRenderNode *node,
node->blend_mode = blend_mode;
}
/**
/*
* gsk_render_node_get_blend_mode:
* @node: a #GskRenderNode
*
* Retrieves the blend mode set by gsk_render_node_set_blend_mode().
*
* Returns: the blend mode
*
* Since: 3.22
*/
GskBlendMode
gsk_render_node_get_blend_mode (GskRenderNode *node)

View File

@ -116,21 +116,14 @@ cairo_t * gsk_render_node_get_draw_context (GskRenderNode
GDK_AVAILABLE_IN_3_22
void gsk_render_node_set_blend_mode (GskRenderNode *node,
GskBlendMode blend_mode);
GDK_AVAILABLE_IN_3_22
GskBlendMode gsk_render_node_get_blend_mode (GskRenderNode *node);
GDK_AVAILABLE_IN_3_22
void gsk_render_node_set_texture (GskRenderNode *node,
int texture_id);
GDK_AVAILABLE_IN_3_22
void gsk_render_node_set_scaling_filter (GskRenderNode *node,
GskScalingFilter min_filter,
GskScalingFilter mag_filter);
GDK_AVAILABLE_IN_3_22
int gsk_render_node_get_scale_factor (GskRenderNode *node);
GDK_AVAILABLE_IN_3_22
void gsk_render_node_set_name (GskRenderNode *node,
const char *name);

View File

@ -94,8 +94,12 @@ int gsk_render_node_get_texture (GskRenderNode *node);
gboolean gsk_render_node_has_surface (GskRenderNode *node);
gboolean gsk_render_node_has_texture (GskRenderNode *node);
GskBlendMode gsk_render_node_get_blend_mode (GskRenderNode *node);
GskRenderNode *gsk_render_node_get_toplevel (GskRenderNode *node);
int gsk_render_node_get_scale_factor (GskRenderNode *node);
void gsk_render_node_update_world_matrix (GskRenderNode *node,
gboolean force);