pub struct SceneBuilderThread {
documents: FastHashMap<DocumentId, Document>,
rx: Receiver<SceneBuilderRequest>,
tx: Sender<ApiMsg>,
config: FrameBuilderConfig,
fonts: SharedFontResources,
size_of_ops: Option<MallocSizeOfOps>,
hooks: Option<Box<dyn SceneBuilderHooks + Send>>,
simulate_slow_ms: u32,
removed_pipelines: HashSet<PipelineId, BuildHasherDefault<FxHasher>>,
capture_config: Option<CaptureConfig>,
debug_flags: DebugFlags,
recycler: SceneRecycler,
}
Fields§
§documents: FastHashMap<DocumentId, Document>
§rx: Receiver<SceneBuilderRequest>
§tx: Sender<ApiMsg>
§config: FrameBuilderConfig
§fonts: SharedFontResources
§size_of_ops: Option<MallocSizeOfOps>
§hooks: Option<Box<dyn SceneBuilderHooks + Send>>
§simulate_slow_ms: u32
§removed_pipelines: HashSet<PipelineId, BuildHasherDefault<FxHasher>>
§capture_config: Option<CaptureConfig>
§debug_flags: DebugFlags
§recycler: SceneRecycler
Implementations§
source§impl SceneBuilderThread
impl SceneBuilderThread
pub fn new( config: FrameBuilderConfig, fonts: SharedFontResources, size_of_ops: Option<MallocSizeOfOps>, hooks: Option<Box<dyn SceneBuilderHooks + Send>>, channels: SceneBuilderThreadChannels, ) -> Self
sourcepub fn send(&self, msg: SceneBuilderResult)
pub fn send(&self, msg: SceneBuilderResult)
Send a message to the render backend thread.
We first put something in the result queue and then send a wake-up message to the api queue that the render backend is blocking on.
fn save_scene(&mut self, config: CaptureConfig)
fn save_capture_sequence(&mut self)
fn start_capture_sequence(&mut self, config: CaptureConfig)
sourcefn process_transaction(&mut self, txn: TransactionMsg) -> Box<BuiltTransaction>
fn process_transaction(&mut self, txn: TransactionMsg) -> Box<BuiltTransaction>
Do the bulk of the work of the scene builder thread.
sourcefn forward_built_transactions(&mut self, txns: Vec<Box<BuiltTransaction>>)
fn forward_built_transactions(&mut self, txns: Vec<Box<BuiltTransaction>>)
Send the results of process_transaction back to the render backend.
sourcefn report_memory(&mut self) -> MemoryReport
fn report_memory(&mut self) -> MemoryReport
Reports CPU heap memory used by the SceneBuilder.
Auto Trait Implementations§
impl Freeze for SceneBuilderThread
impl !RefUnwindSafe for SceneBuilderThread
impl Send for SceneBuilderThread
impl !Sync for SceneBuilderThread
impl Unpin for SceneBuilderThread
impl !UnwindSafe for SceneBuilderThread
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more