forked from AuroraMiddleware/gtk
gsk: Remove GskRenderNode::hidden
If you want to hide something, don't render it.
This commit is contained in:
parent
04a2c1499a
commit
ff884385c0
@ -45,8 +45,6 @@ gsk_render_node_contains
|
||||
gsk_render_node_set_bounds
|
||||
gsk_render_node_set_transform
|
||||
gsk_render_node_set_opacity
|
||||
gsk_render_node_set_hidden
|
||||
gsk_render_node_is_hidden
|
||||
gsk_render_node_set_opaque
|
||||
gsk_render_node_is_opaque
|
||||
gsk_render_node_get_draw_context
|
||||
|
@ -59,9 +59,6 @@ gsk_cairo_renderer_render_node (GskCairoRenderer *self,
|
||||
cairo_matrix_t ctm;
|
||||
graphene_rect_t frame;
|
||||
|
||||
if (gsk_render_node_is_hidden (node))
|
||||
return;
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
if (!gsk_render_node_has_surface (node) &&
|
||||
|
@ -636,14 +636,6 @@ gsk_gl_renderer_add_render_item (GskGLRenderer *self,
|
||||
int program_id;
|
||||
int scale_factor;
|
||||
|
||||
if (gsk_render_node_is_hidden (node))
|
||||
{
|
||||
GSK_NOTE (OPENGL, g_print ("Skipping hidden node <%s>[%p]\n",
|
||||
node->name != NULL ? node->name : "unnamed",
|
||||
node));
|
||||
return;
|
||||
}
|
||||
|
||||
memset (&item, 0, sizeof (RenderItem));
|
||||
|
||||
gsk_renderer_get_viewport (GSK_RENDERER (self), &viewport);
|
||||
|
@ -1003,45 +1003,6 @@ gsk_render_node_get_opacity (GskRenderNode *node)
|
||||
return node->opacity;
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_render_node_set_hidden:
|
||||
* @node: a #GskRenderNode
|
||||
* @hidden: whether the @node should be hidden or not
|
||||
*
|
||||
* Sets whether the @node should be hidden.
|
||||
*
|
||||
* Hidden nodes, and their descendants, are not rendered.
|
||||
*
|
||||
* Since: 3.90
|
||||
*/
|
||||
void
|
||||
gsk_render_node_set_hidden (GskRenderNode *node,
|
||||
gboolean hidden)
|
||||
{
|
||||
g_return_if_fail (GSK_IS_RENDER_NODE (node));
|
||||
g_return_if_fail (node->is_mutable);
|
||||
|
||||
node->hidden = !!hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_render_node_is_hidden:
|
||||
* @node: a #GskRenderNode
|
||||
*
|
||||
* Checks whether a @node is hidden.
|
||||
*
|
||||
* Returns: %TRUE if the #GskRenderNode is hidden
|
||||
*
|
||||
* Since: 3.90
|
||||
*/
|
||||
gboolean
|
||||
gsk_render_node_is_hidden (GskRenderNode *node)
|
||||
{
|
||||
g_return_val_if_fail (GSK_IS_RENDER_NODE (node), TRUE);
|
||||
|
||||
return node->hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_render_node_set_opaque:
|
||||
* @node: a #GskRenderNode
|
||||
|
@ -98,11 +98,6 @@ GDK_AVAILABLE_IN_3_90
|
||||
void gsk_render_node_set_opacity (GskRenderNode *node,
|
||||
double opacity);
|
||||
GDK_AVAILABLE_IN_3_90
|
||||
void gsk_render_node_set_hidden (GskRenderNode *node,
|
||||
gboolean hidden);
|
||||
GDK_AVAILABLE_IN_3_90
|
||||
gboolean gsk_render_node_is_hidden (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_3_90
|
||||
void gsk_render_node_set_opaque (GskRenderNode *node,
|
||||
gboolean opaque);
|
||||
GDK_AVAILABLE_IN_3_90
|
||||
|
@ -58,7 +58,6 @@ struct _GskRenderNode
|
||||
|
||||
/* Bit fields; leave at the end */
|
||||
gboolean is_mutable : 1;
|
||||
gboolean hidden : 1;
|
||||
gboolean opaque : 1;
|
||||
gboolean transform_set : 1;
|
||||
gboolean needs_world_matrix_update : 1;
|
||||
|
@ -64,9 +64,6 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
.node = node
|
||||
};
|
||||
|
||||
if (gsk_render_node_is_hidden (node))
|
||||
return;
|
||||
|
||||
if (gsk_render_node_get_opacity (node) < 1.0)
|
||||
goto fallback;
|
||||
|
||||
|
@ -51,7 +51,6 @@ struct _GtkInspectorRecorderPrivate
|
||||
|
||||
enum {
|
||||
COLUMN_NODE_NAME,
|
||||
COLUMN_NODE_VISIBLE,
|
||||
/* add more */
|
||||
N_NODE_COLUMNS
|
||||
};
|
||||
@ -123,10 +122,6 @@ render_node_list_get_value (GtkTreeModelRenderNode *model,
|
||||
g_value_set_string (value, gsk_render_node_get_name (node));
|
||||
break;
|
||||
|
||||
case COLUMN_NODE_VISIBLE:
|
||||
g_value_set_boolean (value, !gsk_render_node_is_hidden (node));
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
@ -421,8 +416,7 @@ gtk_inspector_recorder_init (GtkInspectorRecorder *recorder)
|
||||
|
||||
priv->render_node_model = gtk_tree_model_render_node_new (render_node_list_get_value,
|
||||
N_NODE_COLUMNS,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_BOOLEAN);
|
||||
G_TYPE_STRING);
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (priv->render_node_tree), priv->render_node_model);
|
||||
g_object_unref (priv->render_node_model);
|
||||
|
||||
|
@ -93,7 +93,6 @@
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
<attribute name="sensitive">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
|
Loading…
Reference in New Issue
Block a user