From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Wed, 9 Aug 2023 13:27:32 +0000 (+0530)
Subject: waterfall: a few todo items for performance
X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/about/reliability?a=commitdiff_plain;h=699c0ca6c802c66b7997b885bf0307889e5c3d66;p=pihpsdr.git

waterfall: a few todo items for performance
---

diff --git a/waterfall.c b/waterfall.c
index 58d883d..46932aa 100644
--- a/waterfall.c
+++ b/waterfall.c
@@ -112,6 +112,12 @@ static gboolean waterfall_scroll_event_cb(GtkWidget *widget,
 void waterfall_update(RECEIVER *rx) {
     int i;
 
+    // New idea:
+    // 1. make a copy of the pixbuf using gdk_pixbuf_copy()
+    // 2. shift the waterfall left or right with gdk_pixbuf_copy_area()
+    // 3. fill the new line.
+    // 4. copy the new pixbuf to old (for now)
+    // 5. later try to get rid of the copy.
     float *samples;
     if (rx->pixbuf) {
         unsigned char *pixels = gdk_pixbuf_get_pixels(rx->pixbuf);