From a40ef45b60a51de523552c24229178534407e994 Mon Sep 17 00:00:00 2001 From: andersendsa <199610634+andersendsa@users.noreply.github.com> Date: Sat, 13 Jun 2026 10:35:37 +0000 Subject: [PATCH 1/7] Add viewport intersection check to cull invisible GraphView edges --- src/widgets/GraphView.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/widgets/GraphView.cpp b/src/widgets/GraphView.cpp index 2aa66a9f34..d2bbe72d4b 100644 --- a/src/widgets/GraphView.cpp +++ b/src/widgets/GraphView.cpp @@ -349,13 +349,18 @@ void GraphView::paint(QPainter &p, QPoint offset, QRect viewport, qreal scale, b p.setBrush(Qt::gray); - // Always draw edges - // TODO: Only draw edges if they are actually visible ... // Draw edges for (GraphEdge &edge : block.edges) { if (edge.polyline.empty()) { continue; } + // View frustum culling for graph edges. + // Skips expensive polyline and arrow rendering if the edge's bounding box + // is completely outside the current viewport. This significantly improves + // rendering performance for large reverse-engineering control flow graphs. + if (!edge.polyline.boundingRect().intersects(windowF)) { + continue; + } const QPolygonF polyline = edge.polyline; const EdgeConfiguration ec = edgeConfiguration(block, &blocks[edge.target], interactive); From 2aa60f4f6c40910a356443e628779b447cb0fed5 Mon Sep 17 00:00:00 2001 From: andersendsa Date: Fri, 19 Jun 2026 19:24:15 +0530 Subject: [PATCH 2/7] draw all edges correctly --- src/widgets/GraphView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/GraphView.cpp b/src/widgets/GraphView.cpp index d2bbe72d4b..3f0deb9471 100644 --- a/src/widgets/GraphView.cpp +++ b/src/widgets/GraphView.cpp @@ -358,7 +358,7 @@ void GraphView::paint(QPainter &p, QPoint offset, QRect viewport, qreal scale, b // Skips expensive polyline and arrow rendering if the edge's bounding box // is completely outside the current viewport. This significantly improves // rendering performance for large reverse-engineering control flow graphs. - if (!edge.polyline.boundingRect().intersects(windowF)) { + if (!edge.polyline.boundingRect().adjusted(-1, -1, 1, 1).intersects(windowF)) { continue; } const QPolygonF polyline = edge.polyline; From 2780890142275ba61607adb153fb241a333d759c Mon Sep 17 00:00:00 2001 From: andersendsa Date: Sat, 20 Jun 2026 07:30:13 +0530 Subject: [PATCH 3/7] ci failure --- .github/workflows/ci.yml | 2 ++ cmake/BundledRizin.cmake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5f6bda4a7..e9d1fa7228 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,7 @@ jobs: run: | # install needed packages apt-get -y install libgraphviz-dev \ + libzip-dev \ mesa-common-dev \ libxkbcommon-x11-dev \ ninja-build \ @@ -632,6 +633,7 @@ jobs: if: contains(matrix.name, 'linux') run: | sudo apt-get -y install libxcb1-dev \ + libzip-dev \ libxkbcommon-dev \ libxcb-*-dev \ libegl1 \ diff --git a/cmake/BundledRizin.cmake b/cmake/BundledRizin.cmake index b89399b417..2c7f63a463 100644 --- a/cmake/BundledRizin.cmake +++ b/cmake/BundledRizin.cmake @@ -18,6 +18,8 @@ if (CUTTER_ENABLE_PACKAGING) list(APPEND MESON_OPTIONS "-Dportable=true") endif() +list(APPEND MESON_OPTIONS "-Duse_sys_libzip=enabled") +git if (CUTTER_ENABLE_SIGDB) list(APPEND MESON_OPTIONS "-Dinstall_sigdb=true") endif() From d37bba78c8ca1a27eb5cacbe44ab2d23d3b6f605 Mon Sep 17 00:00:00 2001 From: andersendsa Date: Sat, 20 Jun 2026 19:22:50 +0530 Subject: [PATCH 4/7] reverting changes --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9d1fa7228..c5f6bda4a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,7 +105,6 @@ jobs: run: | # install needed packages apt-get -y install libgraphviz-dev \ - libzip-dev \ mesa-common-dev \ libxkbcommon-x11-dev \ ninja-build \ @@ -633,7 +632,6 @@ jobs: if: contains(matrix.name, 'linux') run: | sudo apt-get -y install libxcb1-dev \ - libzip-dev \ libxkbcommon-dev \ libxcb-*-dev \ libegl1 \ From c8ba2a6fc8cc800ac004d85ece709fce49583fb1 Mon Sep 17 00:00:00 2001 From: andersendsa Date: Sat, 20 Jun 2026 19:42:50 +0530 Subject: [PATCH 5/7] revert --- cmake/BundledRizin.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/BundledRizin.cmake b/cmake/BundledRizin.cmake index 2c7f63a463..1ea038187a 100644 --- a/cmake/BundledRizin.cmake +++ b/cmake/BundledRizin.cmake @@ -19,7 +19,7 @@ if (CUTTER_ENABLE_PACKAGING) endif() list(APPEND MESON_OPTIONS "-Duse_sys_libzip=enabled") -git + if (CUTTER_ENABLE_SIGDB) list(APPEND MESON_OPTIONS "-Dinstall_sigdb=true") endif() From b132af63a0f7aacaa8f7da615030ad9284b7f818 Mon Sep 17 00:00:00 2001 From: andersendsa Date: Wed, 24 Jun 2026 15:36:38 +0530 Subject: [PATCH 6/7] reverting changes --- cmake/BundledRizin.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/BundledRizin.cmake b/cmake/BundledRizin.cmake index 1ea038187a..b89399b417 100644 --- a/cmake/BundledRizin.cmake +++ b/cmake/BundledRizin.cmake @@ -18,8 +18,6 @@ if (CUTTER_ENABLE_PACKAGING) list(APPEND MESON_OPTIONS "-Dportable=true") endif() -list(APPEND MESON_OPTIONS "-Duse_sys_libzip=enabled") - if (CUTTER_ENABLE_SIGDB) list(APPEND MESON_OPTIONS "-Dinstall_sigdb=true") endif() From 1963656b623a014e1ff9b773cef77f1d58ecd8f1 Mon Sep 17 00:00:00 2001 From: andersendsa Date: Fri, 26 Jun 2026 18:58:44 +0530 Subject: [PATCH 7/7] updating the comment --- src/widgets/GraphView.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/widgets/GraphView.cpp b/src/widgets/GraphView.cpp index 3f0deb9471..e7c6ba1185 100644 --- a/src/widgets/GraphView.cpp +++ b/src/widgets/GraphView.cpp @@ -354,10 +354,8 @@ void GraphView::paint(QPainter &p, QPoint offset, QRect viewport, qreal scale, b if (edge.polyline.empty()) { continue; } - // View frustum culling for graph edges. // Skips expensive polyline and arrow rendering if the edge's bounding box - // is completely outside the current viewport. This significantly improves - // rendering performance for large reverse-engineering control flow graphs. + // is completely outside the current viewport. if (!edge.polyline.boundingRect().adjusted(-1, -1, 1, 1).intersects(windowF)) { continue; }