pub struct CompositingRenderer { /* private fields */ }Expand description
A renderer that utilizes a Compositor to render the visual tree.
Implementations§
Source§impl CompositingRenderer
impl CompositingRenderer
Sourcepub fn new(
root: &Rc<dyn IPresentationSource>,
compositor: &Rc<Compositor>,
surfaces: RenderSurfaces,
) -> Rc<CompositingRenderer>
pub fn new( root: &Rc<dyn IPresentationSource>, compositor: &Rc<Compositor>, surfaces: RenderSurfaces, ) -> Rc<CompositingRenderer>
Creates the renderer of the tree hosted by root. surfaces
returns the platform surfaces to render to.
The renderer refers to its presentation source weakly: the source owns its renderer.
Sourcepub fn with_weak_root(
root: Weak<dyn IPresentationSource>,
compositor: &Rc<Compositor>,
surfaces: RenderSurfaces,
) -> Rc<CompositingRenderer>
pub fn with_weak_root( root: Weak<dyn IPresentationSource>, compositor: &Rc<Compositor>, surfaces: RenderSurfaces, ) -> Rc<CompositingRenderer>
Like new, for a presentation source that is still
being constructed.
Sourcepub fn composition_target(&self) -> &Rc<CompositionTarget>
pub fn composition_target(&self) -> &Rc<CompositionTarget>
The composition target the renderer draws the tree to.
Sourcepub fn compositor_handle(&self) -> &Rc<Compositor>
pub fn compositor_handle(&self) -> &Rc<Compositor>
The compositor of the renderer.
Sourcepub fn set_root(&self, root: Option<Ref<Visual>>)
pub fn set_root(&self, root: Option<Ref<Visual>>)
Sets the visual whose composition visual is the root of the
composition target; None detaches the tree.
Sourcepub fn set_transparency_level(&self, level: CompositionTransparencyLevel)
pub fn set_transparency_level(&self, level: CompositionTransparencyLevel)
Sets the transparency level the composition target renders with.
Sourcepub fn set_platform_specific_scene_info(
&self,
info: Option<Arc<dyn Any + Send + Sync>>,
)
pub fn set_platform_specific_scene_info( &self, info: Option<Arc<dyn Any + Send + Sync>>, )
Sets the platform-specific scene info passed to the render target.
Sourcepub fn hit_tester(&self) -> Option<Rc<dyn IHitTester>>
pub fn hit_tester(&self) -> Option<Rc<dyn IHitTester>>
The renderer as the hit tester of its scene.
pub fn as_any(&self) -> &dyn Any
pub fn trigger_scene_invalidated_for_unit_tests(&self, rect: Rect)
Sourcepub fn has_pending_update_for_unit_tests(&self, visual: &Visual) -> bool
pub fn has_pending_update_for_unit_tests(&self, visual: &Visual) -> bool
Whether the renderer holds visual for its next update pass. For
tests only.
pub fn is_disposed(&self) -> bool
Trait Implementations§
Source§impl IHitTester for CompositingRenderer
impl IHitTester for CompositingRenderer
Source§fn hit_test(
&self,
p: Point,
root: &Visual,
filter: Option<&dyn Fn(&Visual) -> bool>,
) -> Vec<Ref<Visual>>
fn hit_test( &self, p: Point, root: &Visual, filter: Option<&dyn Fn(&Visual) -> bool>, ) -> Vec<Ref<Visual>>
Source§fn hit_test_geometry(
&self,
geometry: &Geometry,
root: &Visual,
filter: Option<&dyn Fn(&Visual) -> bool>,
) -> Vec<GeometryHitTestResult>
fn hit_test_geometry( &self, geometry: &Geometry, root: &Visual, filter: Option<&dyn Fn(&Visual) -> bool>, ) -> Vec<GeometryHitTestResult>
Source§impl IRenderer for CompositingRenderer
impl IRenderer for CompositingRenderer
Source§fn diagnostics(&self) -> Rc<RendererDiagnostics>
fn diagnostics(&self) -> Rc<RendererDiagnostics>
Source§fn scene_invalidated(
&self,
handler: Rc<dyn Fn(&SceneInvalidatedEventArgs)>,
) -> Rc<dyn IDisposable>
fn scene_invalidated( &self, handler: Rc<dyn Fn(&SceneInvalidatedEventArgs)>, ) -> Rc<dyn IDisposable>
Source§fn recalculate_children(&self, visual: &Visual)
fn recalculate_children(&self, visual: &Visual)
Source§fn resized(&self, _size: Size)
fn resized(&self, _size: Size)
Source§fn paint(&self, _rect: Rect)
fn paint(&self, _rect: Rect)
Source§fn try_get_render_interface_feature(
&self,
feature_type: TypeId,
) -> LocalFuture<Option<RenderInterfaceFeature>>
fn try_get_render_interface_feature( &self, feature_type: TypeId, ) -> LocalFuture<Option<RenderInterfaceFeature>>
None (see Compositor::try_get_render_interface_feature:
asynchronous because the render interface may live on the render
thread). The feature is an object of the server side: what is handed
out lends it inside the compositor lock.Source§fn compositor(&self) -> Option<Rc<Compositor>>
fn compositor(&self) -> Option<Rc<Compositor>>
IRendererWithCompositor interface).Auto Trait Implementations§
impl !Freeze for CompositingRenderer
impl !RefUnwindSafe for CompositingRenderer
impl !Send for CompositingRenderer
impl !Sync for CompositingRenderer
impl !UnwindSafe for CompositingRenderer
impl Unpin for CompositingRenderer
impl UnsafeUnpin for CompositingRenderer
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