[gtk+/wip/otte/rendernode: 7/100] gsk: Remove GskRenderNode::hidden
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/rendernode: 7/100] gsk: Remove GskRenderNode::hidden
- Date: Sun, 18 Dec 2016 06:29:17 +0000 (UTC)
commit c420b8544067c37fafe240fc550f48ca83bbcbcc
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 10 00:18:03 2016 +0100
gsk: Remove GskRenderNode::hidden
If you want to hide something, don't render it.
docs/reference/gsk/gsk4-sections.txt | 2 -
gsk/gskcairorenderer.c | 3 --
gsk/gskglrenderer.c | 8 -------
gsk/gskrendernode.c | 39 ----------------------------------
gsk/gskrendernode.h | 5 ----
gsk/gskrendernodeprivate.h | 1 -
gsk/gskvulkanrenderpass.c | 3 --
gtk/inspector/recorder.c | 8 +------
gtk/inspector/recorder.ui | 1 -
9 files changed, 1 insertions(+), 69 deletions(-)
---
diff --git a/docs/reference/gsk/gsk4-sections.txt b/docs/reference/gsk/gsk4-sections.txt
index b8c687b..4a226aa 100644
--- a/docs/reference/gsk/gsk4-sections.txt
+++ b/docs/reference/gsk/gsk4-sections.txt
@@ -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
diff --git a/gsk/gskcairorenderer.c b/gsk/gskcairorenderer.c
index 4c9dfef..9b333c5 100644
--- a/gsk/gskcairorenderer.c
+++ b/gsk/gskcairorenderer.c
@@ -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) &&
diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c
index c0d5288..ad03664 100644
--- a/gsk/gskglrenderer.c
+++ b/gsk/gskglrenderer.c
@@ -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);
diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c
index 556a42e..4f13ab6 100644
--- a/gsk/gskrendernode.c
+++ b/gsk/gskrendernode.c
@@ -1004,45 +1004,6 @@ gsk_render_node_get_opacity (GskRenderNode *node)
}
/**
- * 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
* @opaque: whether the node is fully opaque or not
diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h
index 7e4f530..8e1f44b 100644
--- a/gsk/gskrendernode.h
+++ b/gsk/gskrendernode.h
@@ -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
diff --git a/gsk/gskrendernodeprivate.h b/gsk/gskrendernodeprivate.h
index 2af5347..01e1526 100644
--- a/gsk/gskrendernodeprivate.h
+++ b/gsk/gskrendernodeprivate.h
@@ -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;
diff --git a/gsk/gskvulkanrenderpass.c b/gsk/gskvulkanrenderpass.c
index 1d493b1..892e969 100644
--- a/gsk/gskvulkanrenderpass.c
+++ b/gsk/gskvulkanrenderpass.c
@@ -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;
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index 1fe3c1c..25ddd0a 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -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);
diff --git a/gtk/inspector/recorder.ui b/gtk/inspector/recorder.ui
index 1ab80ee..b7fc96f 100644
--- a/gtk/inspector/recorder.ui
+++ b/gtk/inspector/recorder.ui
@@ -93,7 +93,6 @@
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
- <attribute name="sensitive">1</attribute>
</attributes>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]