pub struct CompositionRenderDataSceneBrushContentProperties {
pub render_data: Rc<ServerCompositionRenderData>,
pub rect: Option<Rect>,
pub use_scalable_rasterization: bool,
}Expand description
What a scene brush sends to its server-side counterpart: the render data
its content was recorded into, the bounds of the content (None: the
bounds of what was drawn) and how the content is rasterized.
Fields§
§render_data: Rc<ServerCompositionRenderData>§rect: Option<Rect>§use_scalable_rasterization: boolImplementations§
Source§impl CompositionRenderDataSceneBrushContentProperties
impl CompositionRenderDataSceneBrushContentProperties
pub fn new( render_data: Rc<ServerCompositionRenderData>, rect: Option<Rect>, use_scalable_rasterization: bool, ) -> Self
Sourcepub fn serialize(
writer: &mut BatchStreamWriter<'_>,
properties: Option<(ServerObjectId, Option<Rect>, bool)>,
)
pub fn serialize( writer: &mut BatchStreamWriter<'_>, properties: Option<(ServerObjectId, Option<Rect>, bool)>, )
Writes the properties (or their absence) on the UI thread, where the render data is known by the id of its server object.
Sourcepub fn deserialize(
reader: &mut BatchStreamReader<'_>,
compositor: Option<&Rc<ServerCompositor>>,
) -> Option<Self>
pub fn deserialize( reader: &mut BatchStreamReader<'_>, compositor: Option<&Rc<ServerCompositor>>, ) -> Option<Self>
Reads what serialize wrote, on the server.
A scene brush creates the render data before its changes are written, so the render data exists when they are read. Should it not (or the compositor be gone), there are no properties: a brush without content is valid and draws nothing.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionRenderDataSceneBrushContentProperties
impl !Send for CompositionRenderDataSceneBrushContentProperties
impl !Sync for CompositionRenderDataSceneBrushContentProperties
impl !UnwindSafe for CompositionRenderDataSceneBrushContentProperties
impl Freeze for CompositionRenderDataSceneBrushContentProperties
impl Unpin for CompositionRenderDataSceneBrushContentProperties
impl UnsafeUnpin for CompositionRenderDataSceneBrushContentProperties
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more