]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
waterfall: a few todo items for performance
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 9 Aug 2023 13:27:32 +0000 (18:57 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 9 Aug 2023 13:27:32 +0000 (18:57 +0530)
waterfall.c

index 58d883d3263768eeff30a61400837e5f9b100a6d..46932aa6aa9e54f0bbf6487397e3d325201ebdcc 100644 (file)
@@ -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);