pub struct TopLevelFramebufferSurface { /* private fields */ }Expand description
The software (framebuffer) render surface of a top-level.
The surface is shared with the thread that renders. The rule of the reference is kept: the render target is created on the UI thread only (the first show and every resize are rendered by the UI thread), and the frames of the render thread reuse it.
Trait Implementations§
Source§impl IFramebufferPlatformSurface for TopLevelFramebufferSurface
impl IFramebufferPlatformSurface for TopLevelFramebufferSurface
Source§fn create_framebuffer_render_target(&self) -> Rc<dyn IFramebufferRenderTarget>
fn create_framebuffer_render_target(&self) -> Rc<dyn IFramebufferRenderTarget>
§Panics
Panics when called off the UI thread or when the top-level has no native render target (it is closed): the render target is not ready.
Source§impl IPlatformRenderSurface for TopLevelFramebufferSurface
impl IPlatformRenderSurface for TopLevelFramebufferSurface
Source§fn is_ready(&self) -> bool
fn is_ready(&self) -> bool
Deviation (DEVIATIONS.md, Native backend): the reference throws
RenderTargetNotReadyException from CreateFramebufferRenderTarget
off the UI thread and the composition target catches it; here the
surface answers that it is not ready (off the UI thread, and once the
top-level is disposed), which the composition target treats the same
way, without a panic to catch.
Source§fn as_framebuffer_surface(&self) -> Option<&dyn IFramebufferPlatformSurface>
fn as_framebuffer_surface(&self) -> Option<&dyn IFramebufferPlatformSurface>
Source§fn try_get_surface_kind(&self, _kind: TypeId) -> Option<Rc<dyn Any>>
fn try_get_surface_kind(&self, _kind: TypeId) -> Option<Rc<dyn Any>>
TypeId::of::<dyn IFoo>() the result holds an Rc<dyn IFoo>.Source§fn text_rendering_parameters(&self) -> Option<PlatformTextRenderingParameters>
fn text_rendering_parameters(&self) -> Option<PlatformTextRenderingParameters>
None from all of them gives the defaults
of the backend (docs/porting/text-rendering.md).Auto Trait Implementations§
impl !Freeze for TopLevelFramebufferSurface
impl !RefUnwindSafe for TopLevelFramebufferSurface
impl Send for TopLevelFramebufferSurface
impl Sync for TopLevelFramebufferSurface
impl Unpin for TopLevelFramebufferSurface
impl UnsafeUnpin for TopLevelFramebufferSurface
impl UnwindSafe for TopLevelFramebufferSurface
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