[gtk/text-node-tweak] textview: Tweak render nodes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/text-node-tweak] textview: Tweak render nodes
- Date: Sun, 28 Mar 2021 15:02:02 +0000 (UTC)
commit a75c038e09db83277bedae8783dc698a4e934078
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 28 10:59:55 2021 -0400
textview: Tweak render nodes
Arrange for the contents to be in a single transform
node that is updated as we scroll. This makes the job
of the render node differ a lot easier, since it does
not have to compare to big containers one-by-one.
gtk/gtktextlayout.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index b90e6d12f1..05d9fa9b2a 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -4160,6 +4160,9 @@ gtk_text_layout_snapshot (GtkTextLayout *layout,
if (line_list == NULL)
return; /* nothing on the screen */
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (0, offset_y));
+ offset_y = 0;
+
cursor_snapshot = gtk_snapshot_new ();
crenderer = gsk_pango_renderer_acquire ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]