git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit3a364e64139b9239e139debf84f1d4bfa4e8525d
parent0a08794d77
authorLucas Galante <[email protected]>
date2026-07-09 10:33
feat(engine): display_list receives frame size and scale (Phase 6)

The Phase 6 frame entry point gets the same (size, scale) arguments as
the legacy view sink — fullscreen apps (wallpaper, screensaver) size
their geometry from it instead of caching dimensions through view.
Mechanical sweep across the eight implementors.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016MjP3pGQEDLkJbV5WEmYBe

 src/backend/window_runner.rs | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index bc87798..aa56965 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -1597,10 +1597,12 @@ pub trait Application: Sized + 'static {
 
     /// Opt into the single paint path (Phase 3): return a display list for this frame and `render()`
     /// draws its geometry via one batched, GPU-scissor-clipped pass instead of the legacy
-    /// `view*` geometry. Default `None` keeps the legacy path. Text, overlays, and `custom_vertices`
-    /// still go through their existing paths. Typically implemented as
+    /// `view*` geometry. Default `None` keeps the legacy path. Overlays and `custom_vertices`
+    /// still go through their existing paths; text renders from the list when
+    /// [`display_list_text`](Application::display_list_text) opts in. Receives the frame's
+    /// logical size and HiDPI scale, like `view`. Typically implemented as
     /// `Some(cce_ui::scene::painter::paint_tree(&self.ui_context, root_ptr))`.
-    fn display_list(&mut self) -> Option<crate::scene::paint::DisplayList> {
+    fn display_list(&mut self, _size: LogicalSize, _scale: f64) -> Option<crate::scene::paint::DisplayList> {
         None
     }
 
@@ -1815,7 +1817,7 @@ impl<A: Application> EngineState<A> {
         // Phase 3 single paint path: when the app provides a display list, its geometry replaces the
         // legacy view* geometry and is drawn as batched, GPU-scissor-clipped runs. Default `None`
         // keeps the legacy path byte-for-byte.
-        let display_list = self.inner.as_mut().unwrap().display_list();
+        let display_list = self.inner.as_mut().unwrap().display_list(LogicalSize::new(logical_w, logical_h), scale_factor);
 
         // 1. Build the frame's DisplayList — from the app's display_list() when provided, otherwise
         // by wrapping its legacy view*/view_vectors geometry — then tessellate it as one path. This