[gtk/wip/baedert/transforms6: 241/273] widget: Push transform node when neccessary
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/transforms6: 241/273] widget: Push transform node when neccessary
- Date: Wed, 13 Feb 2019 09:13:32 +0000 (UTC)
commit 92f988053759a49caa0e1ad4c763019c43b9d7f5
Author: Timm Bäder <mail baedert org>
Date: Sat Jul 21 15:25:47 2018 +0200
widget: Push transform node when neccessary
gtk/gtkwidget.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 8d785a56f2..fa33327ae7 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13011,6 +13011,7 @@ gtk_widget_create_render_node (GtkWidget *widget,
{
GtkWidgetClass *klass = GTK_WIDGET_GET_CLASS (widget);
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
+ const gboolean needs_transform = !graphene_matrix_is_identity (&priv->transform);
GtkCssValue *filter_value;
double opacity;
GtkCssStyle *style;
@@ -13030,6 +13031,9 @@ gtk_widget_create_render_node (GtkWidget *widget,
G_OBJECT_TYPE_NAME (widget), widget,
allocation.width, allocation.height);
+ if (needs_transform)
+ gtk_snapshot_push_transform (snapshot, &priv->transform);
+
filter_value = _gtk_style_context_peek_property (_gtk_widget_get_style_context (widget),
GTK_CSS_PROPERTY_FILTER);
gtk_css_filter_value_push_snapshot (filter_value, snapshot);
@@ -13089,7 +13093,10 @@ gtk_widget_create_render_node (GtkWidget *widget,
gtk_widget_maybe_add_debug_render_nodes (widget, snapshot);
#endif
- gtk_snapshot_pop (snapshot);
+ if (needs_transform)
+ gtk_snapshot_pop (snapshot);
+
+ gtk_snapshot_pop (snapshot); /* Debug */
return gtk_snapshot_free_to_node (snapshot);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]