[gtk/wip/baedert/transforms6: 10/31] 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: 10/31] widget: Push transform node when neccessary
- Date: Thu, 29 Nov 2018 08:09:14 +0000 (UTC)
commit 18cd6e6496cf5ebe7a195e668e37db7dd8daabc9
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 36abe93421..3a69ed02ce 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12995,6 +12995,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;
@@ -13014,6 +13015,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);
@@ -13059,7 +13063,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]