Commit 93c86f32 authored by WR Updater Bot's avatar WR Updater Bot
Browse files

Bug 1505778 - Update webrender to commit...

Bug 1505778 - Update webrender to commit b8829189cfc1769550c9ab4a4bb994e28621f009 (WR PR #3270). r=kats

Differential Revision: https://phabricator.services.mozilla.com/D11358

--HG--
extra : moz-landing-system : lando
parent 4f99ddec
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ use app_units::Au;
use border::{ensure_no_corner_overlap, BorderRadiusAu};
use box_shadow::{BLUR_SAMPLE_SCALE, BoxShadowClipSource, BoxShadowCacheKey};
use box_shadow::get_max_scale_for_box_shadow;
use clip_scroll_tree::{ClipScrollTree, CoordinateSystemId, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
use ellipse::Ellipse;
use gpu_cache::{GpuCache, GpuCacheHandle, ToGpuBlocks};
use gpu_types::{BoxShadowStretchMode};
@@ -97,13 +97,14 @@ use util::{extract_inner_rect_safe, project_rect, ScaleOffset};
// Type definitions for interning clip nodes.
#[cfg_attr(feature = "capture", derive(Serialize))]
#[cfg_attr(feature = "replay", derive(Deserialize))]
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct ClipDataMarker;

pub type ClipDataStore = intern::DataStore<ClipItemKey, ClipNode, ClipDataMarker>;
pub type ClipDataHandle = intern::Handle<ClipDataMarker>;
pub type ClipDataUpdateList = intern::UpdateList<ClipItemKey>;
pub type ClipDataInterner = intern::Interner<ClipItemKey, ClipItemSceneData, ClipDataMarker>;
pub type ClipUid = intern::ItemUid<ClipDataMarker>;

// Result of comparing a clip node instance against a local rect.
#[derive(Debug)]
@@ -256,7 +257,6 @@ struct ClipNodeInfo {
    conversion: ClipSpaceConversion,
    handle: ClipDataHandle,
    spatial_node_index: SpatialNodeIndex,
    has_non_root_coord_system: bool,
}

impl ClipNode {
@@ -423,7 +423,6 @@ pub struct ClipChainInstance {
    // Combined clip rect for clips that are in the
    // same coordinate system as the primitive.
    pub local_clip_rect: LayoutRect,
    pub has_non_root_coord_system: bool,
    pub has_non_local_clips: bool,
    // If true, this clip chain requires allocation
    // of a clip mask.
@@ -578,7 +577,6 @@ impl ClipStore {
        // Run through the clip nodes, and see which ones affect this prim region.

        let first_clip_node_index = self.clip_node_instances.len() as u32;
        let mut has_non_root_coord_system = false;
        let mut has_non_local_clips = false;
        let mut needs_mask = false;

@@ -664,8 +662,6 @@ impl ClipStore {
                        spatial_node_index: node_info.spatial_node_index,
                    };
                    self.clip_node_instances.push(instance);

                    has_non_root_coord_system |= node_info.has_non_root_coord_system;
                }
            }
        }
@@ -679,7 +675,6 @@ impl ClipStore {
        // Return a valid clip chain instance
        Some(ClipChainInstance {
            clips_range,
            has_non_root_coord_system,
            has_non_local_clips,
            local_clip_rect,
            pic_clip_rect,
@@ -1322,7 +1317,6 @@ fn add_clip_node_to_current_chain(
            conversion,
            handle,
            spatial_node_index: clip_spatial_node_index,
            has_non_root_coord_system: clip_spatial_node.coordinate_system_id != CoordinateSystemId::root(),
        })
    }

+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ impl CoordinateSystem {
    }
}

#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq, PartialOrd)]
#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq, PartialOrd, Ord)]
#[cfg_attr(feature = "capture", derive(Serialize))]
#[cfg_attr(feature = "replay", derive(Deserialize))]
pub struct SpatialNodeIndex(pub usize);
+8 −2
Original line number Diff line number Diff line
@@ -173,7 +173,6 @@ impl<'a> DisplayListFlattener<'a> {
        output_pipelines: &FastHashSet<PipelineId>,
        frame_builder_config: &FrameBuilderConfig,
        new_scene: &mut Scene,
        scene_id: u64,
        picture_id_generator: &mut PictureIdGenerator,
        resources: &mut DocumentResources,
    ) -> FrameBuilder {
@@ -221,7 +220,6 @@ impl<'a> DisplayListFlattener<'a> {
            view.inner_rect,
            background_color,
            view.window_size,
            scene_id,
            flattener,
        )
    }
@@ -1007,6 +1005,7 @@ impl<'a> DisplayListFlattener<'a> {
                    &mut self.picture_id_generator,
                    &mut self.prim_store,
                    &self.resources.prim_interner,
                    &self.clip_store,
                );
                (sc.is_3d(), extra_instance)
            },
@@ -1141,6 +1140,7 @@ impl<'a> DisplayListFlattener<'a> {
            prim_list,
            stacking_context.spatial_node_index,
            max_clip,
            &self.clip_store,
        );
        let leaf_pic_index = self.prim_store.create_picture(leaf_picture);

@@ -1185,6 +1185,7 @@ impl<'a> DisplayListFlattener<'a> {
                prim_list,
                stacking_context.spatial_node_index,
                max_clip,
                &self.clip_store,
            );

            current_pic_index = self.prim_store.create_picture(container_picture);
@@ -1211,6 +1212,7 @@ impl<'a> DisplayListFlattener<'a> {
                prim_list,
                stacking_context.spatial_node_index,
                max_clip,
                &self.clip_store,
            );
            let filter_pic_index = self.prim_store.create_picture(filter_picture);
            current_pic_index = filter_pic_index;
@@ -1244,6 +1246,7 @@ impl<'a> DisplayListFlattener<'a> {
                prim_list,
                stacking_context.spatial_node_index,
                max_clip,
                &self.clip_store,
            );
            let blend_pic_index = self.prim_store.create_picture(blend_picture);
            current_pic_index = blend_pic_index;
@@ -1585,6 +1588,7 @@ impl<'a> DisplayListFlattener<'a> {
                            prim_list,
                            pending_shadow.clip_and_scroll.spatial_node_index,
                            max_clip,
                            &self.clip_store,
                        );

                        // Create the primitive to draw the shadow picture into the scene.
@@ -2307,6 +2311,7 @@ impl FlattenedStackingContext {
        picture_id_generator: &mut PictureIdGenerator,
        prim_store: &mut PrimitiveStore,
        prim_interner: &PrimitiveDataInterner,
        clip_store: &ClipStore,
    ) -> Option<PrimitiveInstance> {
        if !self.is_3d() || self.primitives.is_empty() {
            return None
@@ -2335,6 +2340,7 @@ impl FlattenedStackingContext {
            prim_list,
            self.spatial_node_index,
            LayoutRect::max_rect(),
            clip_store,
        );

        let pic_index = prim_store.create_picture(container_picture);
+0 −7
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ pub struct FrameBuilder {
    screen_rect: DeviceUintRect,
    background_color: Option<ColorF>,
    window_size: DeviceUintSize,
    scene_id: u64,
    root_pic_index: PictureIndex,
    pub prim_store: PrimitiveStore,
    pub clip_store: ClipStore,
@@ -66,7 +65,6 @@ pub struct FrameBuilder {
}

pub struct FrameBuildingContext<'a> {
    pub scene_id: u64,
    pub device_pixel_scale: DevicePixelScale,
    pub scene_properties: &'a SceneProperties,
    pub pipelines: &'a FastHashMap<PipelineId, Arc<ScenePipeline>>,
@@ -107,7 +105,6 @@ pub struct PictureContext {
/// Mutable state of a picture that gets modified when
/// the children are processed.
pub struct PictureState {
    pub has_non_root_coord_system: bool,
    pub is_cacheable: bool,
    pub local_rect_changed: bool,
    pub map_local_to_pic: SpaceMapper<LayoutPixel, PicturePixel>,
@@ -146,7 +143,6 @@ impl FrameBuilder {
            screen_rect: DeviceUintRect::zero(),
            window_size: DeviceUintSize::zero(),
            background_color: None,
            scene_id: 0,
            root_pic_index: PictureIndex(0),
            config: FrameBuilderConfig {
                default_font_render_mode: FontRenderMode::Mono,
@@ -161,7 +157,6 @@ impl FrameBuilder {
        screen_rect: DeviceUintRect,
        background_color: Option<ColorF>,
        window_size: DeviceUintSize,
        scene_id: u64,
        flattener: DisplayListFlattener,
    ) -> Self {
        FrameBuilder {
@@ -172,7 +167,6 @@ impl FrameBuilder {
            screen_rect,
            background_color,
            window_size,
            scene_id,
            config: flattener.config,
        }
    }
@@ -207,7 +201,6 @@ impl FrameBuilder {
        let world_rect = (self.screen_rect.to_f32() / device_pixel_scale).round_out();

        let frame_context = FrameBuildingContext {
            scene_id: self.scene_id,
            device_pixel_scale,
            scene_properties,
            pipelines,
+9 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
//! TODO(gw): Add an occupied list head, for fast iteration of the occupied list
//! to implement retain() style functionality.

use std::fmt;
use std::{fmt, u32};
use std::marker::PhantomData;

#[derive(Debug, Copy, Clone, PartialEq)]
@@ -68,6 +68,14 @@ impl<M> FreeListHandle<M> {
            _marker: PhantomData,
        }
    }

    pub fn invalid() -> Self {
        Self {
            index: 0,
            epoch: Epoch::invalid(),
            _marker: PhantomData,
        }
    }
}

impl<M> Clone for WeakFreeListHandle<M> {
Loading