[−][src]Struct webrender_api::DisplayListBuilder
Fields
data: Vec<u8>
pipeline_id: PipelineId
Methods
impl DisplayListBuilder
[src]
impl DisplayListBuilder
pub fn new(pipeline_id: PipelineId, content_size: LayoutSize) -> Self
[src]
pub fn new(pipeline_id: PipelineId, content_size: LayoutSize) -> Self
pub fn with_capacity(
pipeline_id: PipelineId,
content_size: LayoutSize,
capacity: usize
) -> Self
[src]
pub fn with_capacity(
pipeline_id: PipelineId,
content_size: LayoutSize,
capacity: usize
) -> Self
pub fn content_size(&self) -> LayoutSize
[src]
pub fn content_size(&self) -> LayoutSize
Return the content size for this display list
pub fn save(&mut self)
[src]
pub fn save(&mut self)
Saves the current display list state, so it may be restore()
'd.
Conditions:
- Doesn't support popping clips that were pushed before the save.
- Doesn't support nested saves.
- Must call
clear_save()
if the restore becomes unnecessary.
pub fn restore(&mut self)
[src]
pub fn restore(&mut self)
Restores the state of the builder to when save()
was last called.
pub fn clear_save(&mut self)
[src]
pub fn clear_save(&mut self)
Discards the builder's save (indicating the attempted operation was successful).
pub fn print_display_list(
&mut self,
indent: usize,
start: Option<usize>,
end: Option<usize>
) -> usize
[src]
pub fn print_display_list(
&mut self,
indent: usize,
start: Option<usize>,
end: Option<usize>
) -> usize
Print the display items in the list to stderr. If the start parameter is specified, only display items starting at that index (inclusive) will be printed. If the end parameter is specified, only display items before that index (exclusive) will be printed. Calling this function with end <= start is allowed but is just a waste of CPU cycles. This function returns the total number of items in the display list, which allows the caller to subsequently invoke this function to only dump the newly-added items.
pub fn push_item(
&mut self,
item: SpecificDisplayItem,
info: &LayoutPrimitiveInfo
)
[src]
pub fn push_item(
&mut self,
item: SpecificDisplayItem,
info: &LayoutPrimitiveInfo
)
Add an item to the display list.
NOTE: It is usually preferable to use the specialized methods to push display items. Pushing unexpected or invalid items here may result in WebRender panicking or behaving in unexpected ways.
pub fn push_iter<I>(&mut self, iter: I) where
I: IntoIterator,
I::IntoIter: ExactSizeIterator + Clone,
I::Item: Serialize,
[src]
pub fn push_iter<I>(&mut self, iter: I) where
I: IntoIterator,
I::IntoIter: ExactSizeIterator + Clone,
I::Item: Serialize,
Push items from an iterator to the display list.
NOTE: Pushing unexpected or invalid items to the display list may result in panic and confusion.
pub fn push_rect(&mut self, info: &LayoutPrimitiveInfo, color: ColorF)
[src]
pub fn push_rect(&mut self, info: &LayoutPrimitiveInfo, color: ColorF)
pub fn push_clear_rect(&mut self, info: &LayoutPrimitiveInfo)
[src]
pub fn push_clear_rect(&mut self, info: &LayoutPrimitiveInfo)
pub fn push_line(
&mut self,
info: &LayoutPrimitiveInfo,
wavy_line_thickness: f32,
orientation: LineOrientation,
color: &ColorF,
style: LineStyle
)
[src]
pub fn push_line(
&mut self,
info: &LayoutPrimitiveInfo,
wavy_line_thickness: f32,
orientation: LineOrientation,
color: &ColorF,
style: LineStyle
)
pub fn push_image(
&mut self,
info: &LayoutPrimitiveInfo,
stretch_size: LayoutSize,
tile_spacing: LayoutSize,
image_rendering: ImageRendering,
alpha_type: AlphaType,
key: ImageKey,
color: ColorF
)
[src]
pub fn push_image(
&mut self,
info: &LayoutPrimitiveInfo,
stretch_size: LayoutSize,
tile_spacing: LayoutSize,
image_rendering: ImageRendering,
alpha_type: AlphaType,
key: ImageKey,
color: ColorF
)
pub fn push_yuv_image(
&mut self,
info: &LayoutPrimitiveInfo,
yuv_data: YuvData,
color_depth: ColorDepth,
color_space: YuvColorSpace,
image_rendering: ImageRendering
)
[src]
pub fn push_yuv_image(
&mut self,
info: &LayoutPrimitiveInfo,
yuv_data: YuvData,
color_depth: ColorDepth,
color_space: YuvColorSpace,
image_rendering: ImageRendering
)
Push a yuv image. All planar data in yuv image should use the same buffer type.
pub fn push_text(
&mut self,
info: &LayoutPrimitiveInfo,
glyphs: &[GlyphInstance],
font_key: FontInstanceKey,
color: ColorF,
glyph_options: Option<GlyphOptions>
)
[src]
pub fn push_text(
&mut self,
info: &LayoutPrimitiveInfo,
glyphs: &[GlyphInstance],
font_key: FontInstanceKey,
color: ColorF,
glyph_options: Option<GlyphOptions>
)
pub fn create_gradient(
&mut self,
start_point: LayoutPoint,
end_point: LayoutPoint,
stops: Vec<GradientStop>,
extend_mode: ExtendMode
) -> Gradient
[src]
pub fn create_gradient(
&mut self,
start_point: LayoutPoint,
end_point: LayoutPoint,
stops: Vec<GradientStop>,
extend_mode: ExtendMode
) -> Gradient
NOTE: gradients must be pushed in the order they're created because create_gradient stores the stops in anticipation.
pub fn create_radial_gradient(
&mut self,
center: LayoutPoint,
radius: LayoutSize,
stops: Vec<GradientStop>,
extend_mode: ExtendMode
) -> RadialGradient
[src]
pub fn create_radial_gradient(
&mut self,
center: LayoutPoint,
radius: LayoutSize,
stops: Vec<GradientStop>,
extend_mode: ExtendMode
) -> RadialGradient
NOTE: gradients must be pushed in the order they're created because create_gradient stores the stops in anticipation.
pub fn push_border(
&mut self,
info: &LayoutPrimitiveInfo,
widths: LayoutSideOffsets,
details: BorderDetails
)
[src]
pub fn push_border(
&mut self,
info: &LayoutPrimitiveInfo,
widths: LayoutSideOffsets,
details: BorderDetails
)
pub fn push_box_shadow(
&mut self,
info: &LayoutPrimitiveInfo,
box_bounds: LayoutRect,
offset: LayoutVector2D,
color: ColorF,
blur_radius: f32,
spread_radius: f32,
border_radius: BorderRadius,
clip_mode: BoxShadowClipMode
)
[src]
pub fn push_box_shadow(
&mut self,
info: &LayoutPrimitiveInfo,
box_bounds: LayoutRect,
offset: LayoutVector2D,
color: ColorF,
blur_radius: f32,
spread_radius: f32,
border_radius: BorderRadius,
clip_mode: BoxShadowClipMode
)
pub fn push_gradient(
&mut self,
info: &LayoutPrimitiveInfo,
gradient: Gradient,
tile_size: LayoutSize,
tile_spacing: LayoutSize
)
[src]
pub fn push_gradient(
&mut self,
info: &LayoutPrimitiveInfo,
gradient: Gradient,
tile_size: LayoutSize,
tile_spacing: LayoutSize
)
Pushes a linear gradient to be displayed.
The gradient itself is described in the
gradient
parameter. It is drawn on
a "tile" with the dimensions from tile_size
.
These tiles are now repeated to the right and
to the bottom infinitely. If tile_spacing
is not zero spacers with the given dimensions
are inserted between the tiles as seams.
The origin of the tiles is given in info.rect.origin
.
If the gradient should only be displayed once limit
the info.rect.size
to a single tile.
The gradient is only visible within the local clip.
pub fn push_radial_gradient(
&mut self,
info: &LayoutPrimitiveInfo,
gradient: RadialGradient,
tile_size: LayoutSize,
tile_spacing: LayoutSize
)
[src]
pub fn push_radial_gradient(
&mut self,
info: &LayoutPrimitiveInfo,
gradient: RadialGradient,
tile_size: LayoutSize,
tile_spacing: LayoutSize
)
Pushes a radial gradient to be displayed.
See push_gradient
for explanation.
pub fn push_reference_frame(
&mut self,
info: &LayoutPrimitiveInfo,
transform: Option<PropertyBinding<LayoutTransform>>,
perspective: Option<LayoutTransform>
) -> ClipId
[src]
pub fn push_reference_frame(
&mut self,
info: &LayoutPrimitiveInfo,
transform: Option<PropertyBinding<LayoutTransform>>,
perspective: Option<LayoutTransform>
) -> ClipId
pub fn pop_reference_frame(&mut self)
[src]
pub fn pop_reference_frame(&mut self)
pub fn push_stacking_context(
&mut self,
info: &LayoutPrimitiveInfo,
clip_node_id: Option<ClipId>,
transform_style: TransformStyle,
mix_blend_mode: MixBlendMode,
filters: Vec<FilterOp>,
raster_space: RasterSpace
)
[src]
pub fn push_stacking_context(
&mut self,
info: &LayoutPrimitiveInfo,
clip_node_id: Option<ClipId>,
transform_style: TransformStyle,
mix_blend_mode: MixBlendMode,
filters: Vec<FilterOp>,
raster_space: RasterSpace
)
pub fn pop_stacking_context(&mut self)
[src]
pub fn pop_stacking_context(&mut self)
pub fn push_stops(&mut self, stops: &[GradientStop])
[src]
pub fn push_stops(&mut self, stops: &[GradientStop])
pub fn define_scroll_frame<I>(
&mut self,
external_id: Option<ExternalScrollId>,
content_rect: LayoutRect,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>,
scroll_sensitivity: ScrollSensitivity
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
[src]
pub fn define_scroll_frame<I>(
&mut self,
external_id: Option<ExternalScrollId>,
content_rect: LayoutRect,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>,
scroll_sensitivity: ScrollSensitivity
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
pub fn define_scroll_frame_with_parent<I>(
&mut self,
parent: ClipId,
external_id: Option<ExternalScrollId>,
content_rect: LayoutRect,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>,
scroll_sensitivity: ScrollSensitivity
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
[src]
pub fn define_scroll_frame_with_parent<I>(
&mut self,
parent: ClipId,
external_id: Option<ExternalScrollId>,
content_rect: LayoutRect,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>,
scroll_sensitivity: ScrollSensitivity
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
pub fn define_clip_chain<I>(
&mut self,
parent: Option<ClipChainId>,
clips: I
) -> ClipChainId where
I: IntoIterator<Item = ClipId>,
I::IntoIter: ExactSizeIterator + Clone,
[src]
pub fn define_clip_chain<I>(
&mut self,
parent: Option<ClipChainId>,
clips: I
) -> ClipChainId where
I: IntoIterator<Item = ClipId>,
I::IntoIter: ExactSizeIterator + Clone,
pub fn define_clip<I>(
&mut self,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
[src]
pub fn define_clip<I>(
&mut self,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
pub fn define_clip_with_parent<I>(
&mut self,
parent: ClipId,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
[src]
pub fn define_clip_with_parent<I>(
&mut self,
parent: ClipId,
clip_rect: LayoutRect,
complex_clips: I,
image_mask: Option<ImageMask>
) -> ClipId where
I: IntoIterator<Item = ComplexClipRegion>,
I::IntoIter: ExactSizeIterator + Clone,
pub fn define_sticky_frame(
&mut self,
frame_rect: LayoutRect,
margins: SideOffsets2D<Option<f32>>,
vertical_offset_bounds: StickyOffsetBounds,
horizontal_offset_bounds: StickyOffsetBounds,
previously_applied_offset: LayoutVector2D
) -> ClipId
[src]
pub fn define_sticky_frame(
&mut self,
frame_rect: LayoutRect,
margins: SideOffsets2D<Option<f32>>,
vertical_offset_bounds: StickyOffsetBounds,
horizontal_offset_bounds: StickyOffsetBounds,
previously_applied_offset: LayoutVector2D
) -> ClipId
pub fn push_clip_id(&mut self, id: ClipId)
[src]
pub fn push_clip_id(&mut self, id: ClipId)
pub fn push_clip_and_scroll_info(&mut self, info: ClipAndScrollInfo)
[src]
pub fn push_clip_and_scroll_info(&mut self, info: ClipAndScrollInfo)
pub fn pop_clip_id(&mut self)
[src]
pub fn pop_clip_id(&mut self)
pub fn push_iframe(
&mut self,
info: &LayoutPrimitiveInfo,
pipeline_id: PipelineId,
ignore_missing_pipeline: bool
)
[src]
pub fn push_iframe(
&mut self,
info: &LayoutPrimitiveInfo,
pipeline_id: PipelineId,
ignore_missing_pipeline: bool
)
pub fn push_shadow(&mut self, info: &LayoutPrimitiveInfo, shadow: Shadow)
[src]
pub fn push_shadow(&mut self, info: &LayoutPrimitiveInfo, shadow: Shadow)
pub fn pop_all_shadows(&mut self)
[src]
pub fn pop_all_shadows(&mut self)
pub fn finalize(self) -> (PipelineId, LayoutSize, BuiltDisplayList)
[src]
pub fn finalize(self) -> (PipelineId, LayoutSize, BuiltDisplayList)
Trait Implementations
impl Clone for DisplayListBuilder
[src]
impl Clone for DisplayListBuilder
fn clone(&self) -> DisplayListBuilder
[src]
fn clone(&self) -> DisplayListBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for DisplayListBuilder
impl Send for DisplayListBuilder
impl Sync for DisplayListBuilder
impl Sync for DisplayListBuilder
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more