pub(crate) struct LayoutContext<'a> {
pub style_context: SharedStyleContext<'a>,
pub font_context: Arc<FontContext>,
pub iframe_sizes: Mutex<IFrameSizes>,
pub image_resolver: Arc<ImageResolver>,
pub painter_id: PainterId,
pub allow_parallel_layout: bool,
pub parallelism_job_count_minimum: usize,
pub parallelism_job_size_minimum: usize,
}Fields§
§style_context: SharedStyleContext<'a>Bits shared by the layout and style system.
font_context: Arc<FontContext>A FontContext to be used during layout.
iframe_sizes: Mutex<IFrameSizes>A collection of <iframe> sizes to send back to script.
image_resolver: Arc<ImageResolver>An ImageResolver used for resolving images during box and fragment
tree construction. Later passed to display list construction.
painter_id: PainterIdThe PainterId that identifies which RenderingContext that this layout targets.
allow_parallel_layout: boolWhether or not parallel layout should be allowed for this layout.
parallelism_job_count_minimum: usizeThe minimum number of jobs that need to be larger than
Self::parallelism_job_size_minimum in order to enable parallelism.
parallelism_job_size_minimum: usizeThe minimum size a job needs to be to be counted when determining if the number of
jobs exceeds Self::parallelism_job_count_minimum.
Implementations§
Source§impl LayoutContext<'_>
impl LayoutContext<'_>
pub(crate) fn should_parallelize(&self, number_of_jobs: usize) -> bool
pub(crate) fn should_parallelize_layout( &self, jobs: impl Iterator<Item = usize>, ) -> bool
Auto Trait Implementations§
impl<'a> !Freeze for LayoutContext<'a>
impl<'a> !RefUnwindSafe for LayoutContext<'a>
impl<'a> Send for LayoutContext<'a>
impl<'a> Sync for LayoutContext<'a>
impl<'a> Unpin for LayoutContext<'a>
impl<'a> UnsafeUnpin for LayoutContext<'a>
impl<'a> !UnwindSafe for LayoutContext<'a>
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert