pub struct BrowserSharedRenderLoop;Expand description
The one render loop of the page. Every view renders in the animation
frames of one thread: the thread of the user interface, or the render
thread when the platform started one
(start_render_thread).
Implementations§
Sourcepub fn render_timer() -> Arc<BrowserRenderTimer> ⓘ
pub fn render_timer() -> Arc<BrowserRenderTimer> ⓘ
The render timer of the page. Upstream creates it with
RunsInBackground false in both of its modes; here it runs in the
background when it was created for the render thread
(start_render_thread).
Sourcepub fn start_render_thread() -> bool
pub fn start_render_thread() -> bool
Starts the render thread of the page and makes the render timer one that ticks there, in the background. Returns whether the views of the page are rendered by the render thread from here on.
The platform calls it once, when it is registered, in a module built
with threads: before the first view is created and before anything
asks for the render timer or the render loop. The thread of the user
interface does not wait for the thread
(RenderWorker::start); a view that is created before the thread
has reported itself is not ready until it has.
The answer is false, and the page renders on the thread of the
user interface as it does without threads, when the module was built
without threads, when the thread cannot be created, when the render
timer exists already (the order above was not kept) and when a
render thread was started by somebody else, with a frame loop of
their own.
Sourcepub fn renders_on_render_thread() -> bool
pub fn renders_on_render_thread() -> bool
Whether the render loop of the page ticks on the render thread: the compositor of a view is then confined to that thread, and the canvas of a view is created for it.
Sourcepub fn render_loop() -> Arc<dyn IRenderLoop> ⓘ
pub fn render_loop() -> Arc<dyn IRenderLoop> ⓘ
The render loop driven by render_timer.
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more