File tree Expand file tree Collapse file tree
examples/slint/src/maplibre Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -330,6 +330,9 @@ fn build_bridge(
330330 . includes ( & bridge_include_dirs)
331331 . includes ( include_dirs)
332332 . flag_if_supported ( "-std=c++20" )
333+ // mbgl-core defaults to no RTTI (CMake `MLN_WITH_RTTI=OFF` adds `-fno-rtti` on GCC/Clang).
334+ // The bridge uses no `dynamic_cast`/`typeid`, so `-fno-rtti` is safe.
335+ // (MSVC keeps RTTI on both sides)
333336 . flag_if_supported ( "-fno-rtti" )
334337 . warnings ( true )
335338 . warnings_into_errors ( true ) ;
Original file line number Diff line number Diff line change @@ -141,7 +141,5 @@ impl MapLibre {
141141}
142142
143143pub fn create_map ( size : Size ) -> Rc < RefCell < MapLibre > > {
144- let map_size =
145- if size. width > 0 && size. height > 0 { size } else { Size { width : 0 , height : 0 } } ;
146- Rc :: new ( RefCell :: new ( MapLibre :: new ( map_size) ) )
144+ Rc :: new ( RefCell :: new ( MapLibre :: new ( size) ) )
147145}
Original file line number Diff line number Diff line change @@ -101,10 +101,17 @@ impl ImageRendererBuilder {
101101
102102 /// Builds a continuous renderer.
103103 ///
104- /// Frames are host-driven: use [`ImageRenderer::set_render_requested_callback`] to wake the
105- /// host UI's display loop, then call [`ImageRenderer::render_once`] for each scheduled frame.
104+ /// Frames are host-driven: use [`ImageRenderer::<Continuous>:: set_render_requested_callback`] to wake the
105+ /// host UI's display loop, then call [`ImageRenderer::<Continuous>:: render_once`] for each scheduled frame.
106106 ///
107107 /// Use the `MapObserver` to react to signals from the map.
108+ ///
109+ /// # Breaking change
110+ ///
111+ /// This renderer no longer self-invalidates (MapLibre Native used to schedule
112+ /// its own renders on update). The signature is unchanged, so existing callers
113+ /// keep compiling but stop producing frames until they drive
114+ /// [`render_once`](ImageRenderer::<Continuous>::render_once) themselves.
108115 #[ must_use]
109116 pub fn build_continuous_renderer ( self ) -> ImageRenderer < Continuous > {
110117 ImageRenderer :: new ( MapMode :: Continuous , self )
Original file line number Diff line number Diff line change @@ -583,6 +583,12 @@ impl ImageRenderer<Continuous> {
583583 ///
584584 /// Call this once per frame requested by the host UI for a renderer created with
585585 /// [`build_continuous_renderer`](crate::ImageRendererBuilder::build_continuous_renderer).
586+ ///
587+ /// It also advances MapLibre Native's run loop once so asynchronous work (style
588+ /// and tile loading) can progress — except on macOS/iOS, where the Core
589+ /// Foundation run loop is assumed to be driven by the host UI's main loop. A
590+ /// continuous renderer on a dedicated Apple thread with no host loop must pump
591+ /// it itself (see [`RunLoopHandle`]).
586592 pub fn render_once ( & mut self ) {
587593 self . instance . pin_mut ( ) . render_once ( ) ;
588594 }
You can’t perform that action at this time.
0 commit comments