pub struct SoftwareRenderer {
pub rendered_regions_count: usize,
pub rendered_pixels_count: usize,
/* private fields */
}Expand description
有状态软件渲染器。
Fields§
§rendered_regions_count: usize§rendered_pixels_count: usizeImplementations§
Source§impl SoftwareRenderer
impl SoftwareRenderer
Sourcepub const fn new_with_repaint_buffer_type(
repaint_buffer_type: RepaintBufferType,
) -> Self
pub const fn new_with_repaint_buffer_type( repaint_buffer_type: RepaintBufferType, ) -> Self
创建指定 RepaintBufferType 缓冲复用类型的软件渲染器。
Sourcepub fn set_repaint_buffer_type(
&mut self,
repaint_buffer_type: RepaintBufferType,
)
pub fn set_repaint_buffer_type( &mut self, repaint_buffer_type: RepaintBufferType, )
动态设置帧缓冲重绘复用类型。
Trait Implementations§
Source§impl Clone for SoftwareRenderer
impl Clone for SoftwareRenderer
Source§impl Debug for SoftwareRenderer
impl Debug for SoftwareRenderer
Source§impl Default for SoftwareRenderer
impl Default for SoftwareRenderer
Source§impl PixelBufferRenderer for SoftwareRenderer
impl PixelBufferRenderer for SoftwareRenderer
Source§fn render_region_to_buffer<P: PixelFormat>(
&mut self,
ops: &[DrawOp<'_>],
dirty_region: Region,
origin_x: i16,
origin_y: i16,
stride: usize,
target: &mut [P],
)
fn render_region_to_buffer<P: PixelFormat>( &mut self, ops: &[DrawOp<'_>], dirty_region: Region, origin_x: i16, origin_y: i16, stride: usize, target: &mut [P], )
Source§impl Renderer for SoftwareRenderer
impl Renderer for SoftwareRenderer
Source§fn repaint_buffer_type(&self) -> RepaintBufferType
fn repaint_buffer_type(&self) -> RepaintBufferType
获取或配置当前渲染器的帧缓冲重绘复用策略(
NewBuffer / ReusedBuffer / SwappedBuffers)。Source§fn render_draw_ops(
&mut self,
_ops: &[DrawOp<'_>],
_viewport: Region,
_dpi_scale: i16,
dirty_regions: &[Region],
) -> (usize, usize)
fn render_draw_ops( &mut self, _ops: &[DrawOp<'_>], _viewport: Region, _dpi_scale: i16, dirty_regions: &[Region], ) -> (usize, usize)
Source§fn render_frame_dt(
&mut self,
engine: &mut VeloxEngine,
dt_ms: u16,
) -> (usize, usize)
fn render_frame_dt( &mut self, engine: &mut VeloxEngine, dt_ms: u16, ) -> (usize, usize)
驱动
VeloxEngine 步进 dt_ms 并使用当前渲染器渲染本帧所有脏矩形。Auto Trait Implementations§
impl Forget for SoftwareRenderer
impl Freeze for SoftwareRenderer
impl Move for SoftwareRenderer
impl RefUnwindSafe for SoftwareRenderer
impl Send for SoftwareRenderer
impl Sync for SoftwareRenderer
impl Unpin for SoftwareRenderer
impl UnsafeUnpin for SoftwareRenderer
impl UnwindSafe for SoftwareRenderer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。