Skip to content

Commit d1e42a5

Browse files
committed
Simlify Picture3DContext signature a bit
1 parent 7830f29 commit d1e42a5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

webrender/src/display_list_flattener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,7 @@ struct FlattenedStackingContext {
21752175
transform_style: TransformStyle,
21762176

21772177
/// Defines the relationship to a preserve-3D hiearachy.
2178-
context_3d: Picture3DContext<Vec<PrimitiveInstance>>,
2178+
context_3d: Picture3DContext<PrimitiveInstance>,
21792179
}
21802180

21812181
impl FlattenedStackingContext {

webrender/src/picture.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ pub struct PictureCacheKey {
158158

159159
/// Enum value describing the place of a picture in a 3D context.
160160
#[derive(Clone, Debug)]
161-
pub enum Picture3DContext<R> {
161+
pub enum Picture3DContext<C> {
162162
/// The picture is not a part of 3D context sub-hierarchy.
163163
Out,
164164
/// The picture is a part of 3D context.
165165
In {
166-
/// Additional data for the case of this a root of 3D hierarchy.
167-
root_data: Option<R>,
166+
/// Additional data per child for the case of this a root of 3D hierarchy.
167+
root_data: Option<Vec<C>>,
168168
/// The spatial node index of an "ancestor" element, i.e. one
169169
/// that establishes the transformed element’s containing block.
170170
///
@@ -210,7 +210,7 @@ pub struct PicturePrimitive {
210210
pub requested_raster_space: RasterSpace,
211211

212212
pub raster_config: Option<RasterConfig>,
213-
pub context_3d: Picture3DContext<Vec<OrderedPictureChild>>,
213+
pub context_3d: Picture3DContext<OrderedPictureChild>,
214214

215215
// If requested as a frame output (for rendering
216216
// pages to a texture), this is the pipeline this
@@ -245,7 +245,7 @@ impl PicturePrimitive {
245245
pub fn new_image(
246246
id: PictureId,
247247
requested_composite_mode: Option<PictureCompositeMode>,
248-
context_3d: Picture3DContext<Vec<OrderedPictureChild>>,
248+
context_3d: Picture3DContext<OrderedPictureChild>,
249249
pipeline_id: PipelineId,
250250
frame_output_pipeline_id: Option<PipelineId>,
251251
apply_local_clip_rect: bool,

0 commit comments

Comments
 (0)