diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-28 10:59:55 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-28 10:59:55 -0400 |
commit | a75c038e09db83277bedae8783dc698a4e934078 (patch) | |
tree | 209123365fdb089fb42ac5a608a071317202115b | |
parent | 3e1a8aa286c2cf9dd819724a479156229570ff02 (diff) | |
download | gtk+-text-node-tweak.tar.gz |
textview: Tweak render nodestext-node-tweak
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.
-rw-r--r-- | gtk/gtktextlayout.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 (); |