[gtk+/gtk-3-16] treeview: always pixelcache widget contents
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] treeview: always pixelcache widget contents
- Date: Tue, 7 Jul 2015 14:33:37 +0000 (UTC)
commit 22d0c317c2526a49b7d8fbc408f9c11070204a70
Author: Christian Hergert <christian hergert me>
Date: Tue Jun 16 16:50:44 2015 -0700
treeview: always pixelcache widget contents
GtkTreeView has a particularly expensive drawing path. This can cause
issues when part of animated widget sequences. Caching the content while
a model is attached helps reduce the number of full redraws during
exposure greatly.
https://bugzilla.gnome.org/show_bug.cgi?id=751082
gtk/gtktreeview.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 87d446b..c7341fd 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -11536,6 +11536,8 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
if (tree_view->priv->selection)
_gtk_tree_selection_emit_changed (tree_view->priv->selection);
+ _gtk_pixel_cache_set_always_cache (tree_view->priv->pixel_cache, (model != NULL));
+
if (gtk_widget_get_realized (GTK_WIDGET (tree_view)))
gtk_widget_queue_resize (GTK_WIDGET (tree_view));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]