Bug 1517838 - Update webrender to commit 48b6b15e68c935a07d66a36f7ca6dd7438924d57 (WR PR #3472). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Sat, 05 Jan 2019 02:48:20 +0000
changeset 509730 4a1af6e7446a70f3e9b36541c317054bfab692f7
parent 509729 fedf648d3785496798d361b31c9bdd144e2b5897
child 509731 1ed041abb586e1085d1493403380d2e524b15c08
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1517838
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517838 - Update webrender to commit 48b6b15e68c935a07d66a36f7ca6dd7438924d57 (WR PR #3472). r=kats https://github.com/servo/webrender/pull/3472 Differential Revision: https://phabricator.services.mozilla.com/D15782
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/doc/CLIPPING_AND_POSITIONING.md
gfx/wr/webrender/src/clip.rs
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-5e06512aee0a2e09379a49111c36f91d0ae489f4
+48b6b15e68c935a07d66a36f7ca6dd7438924d57
--- a/gfx/wr/webrender/doc/CLIPPING_AND_POSITIONING.md
+++ b/gfx/wr/webrender/doc/CLIPPING_AND_POSITIONING.md
@@ -135,17 +135,17 @@ these incongruities is that while `ClipN
 are defined and simply return a `ClipId`, reference frames return a `ClipId` and
 also are pushed and popped like stacking contexts.
 
 ## Converting `ClipId` to global `ClipScrollTree` indices
 
 WebRender must access `ClipNodes` and `SpatialNodes` quite a bit when building
 scenes and frames, so it tries to convert `ClipIds`, which are already
 per-pipeline indices, to global scene-wide indices.  Internally this is a
-conversion from `ClipId` into `SpatialNodeIndex`, `ClipNodeIndex` or
+conversion from `ClipId` into `SpatialNodeIndex` or
 `ClipChainIndex`. In order to make this conversion cheaper, the
 `DisplayListFlattner` assigns offsets for each pipeline and node type in the
 scene-wide `ClipScrollTree`.
 
 Nodes are added to their respective arrays sequentially as the display list is
 processed during "flattening." When encountering an iframe, the
 `DisplayListFlattener` must start processing the nodes for that iframe's
 pipeline, meaning that nodes are now being added out of order to the node arrays
--- a/gfx/wr/webrender/src/clip.rs
+++ b/gfx/wr/webrender/src/clip.rs
@@ -31,70 +31,80 @@ use util::{extract_inner_rect_safe, proj
 
  There are a number of data structures involved in the clip module:
 
  ClipStore - Main interface used by other modules.
 
  ClipItem - A single clip item (e.g. a rounded rect, or a box shadow).
             These are an exposed API type, stored inline in a ClipNode.
 
- ClipNode - A ClipItem with attached positioning information (a spatial node index).
-            Stored as a contiguous array of nodes within the ClipStore.
+ ClipNode - A ClipItem with an attached GPU handle. The GPU handle is populated
+            when a ClipNodeInstance is built from this node (which happens while
+            preparing primitives for render).
 
+ ClipNodeInstance - A ClipNode with attached positioning information (a spatial
+                    node index). This is stored as a contiguous array of nodes
+                    within the ClipStore.
+
+    +-----------------------+-----------------------+-----------------------+
+    | ClipNodeInstance      | ClipNodeInstance      | ClipNodeInstance      |
     +-----------------------+-----------------------+-----------------------+
     | ClipItem              | ClipItem              | ClipItem              |
     | Spatial Node Index    | Spatial Node Index    | Spatial Node Index    |
     | GPU cache handle      | GPU cache handle      | GPU cache handle      |
+    | ...                   | ...                   | ...                   |
     +-----------------------+-----------------------+-----------------------+
                0                        1                       2
 
        +----------------+    |                                              |
-       | ClipItemRange  |____|                                              |
+       | ClipNodeRange  |____|                                              |
        |    index: 1    |                                                   |
        |    count: 2    |___________________________________________________|
        +----------------+
 
- ClipItemRange - A clip item range identifies a range of clip nodes. It is stored
-                 as an (index, count).
+ ClipNodeRange - A clip item range identifies a range of clip nodes instances.
+                 It is stored as an (index, count).
+
+ ClipChainNode - A clip chain node contains a handle to an interned clip item,
+                 positioning information (from where the clip was defined), and
+                 an optional parent link to another ClipChainNode. ClipChainId
+                 is an index into an array, or ClipChainId::NONE for no parent.
 
- ClipChain - A clip chain node contains a range of ClipNodes (a ClipItemRange)
-             and a parent link to an optional ClipChain. Both legacy hierchical clip
-             chains and user defined API clip chains use the same data structure.
-             ClipChainId is an index into an array, or ClipChainId::NONE for no parent.
-
-    +----------------+    ____+----------------+    ____+----------------+    ____+----------------+
-    | ClipChain      |   |    | ClipChain      |   |    | ClipChain      |   |    | ClipChain      |
-    +----------------+   |    +----------------+   |    +----------------+   |    +----------------+
-    | ClipItemRange  |   |    | ClipItemRange  |   |    | ClipItemRange  |   |    | ClipItemRange  |
-    | Parent Id      |___|    | Parent Id      |___|    | Parent Id      |___|    | Parent Id      |
-    +----------------+        +----------------+        +----------------+        +----------------+
+    +----------------+    ____+----------------+    ____+----------------+   /---> ClipChainId::NONE
+    | ClipChainNode  |   |    | ClipChainNode  |   |    | ClipChainNode  |   |
+    +----------------+   |    +----------------+   |    +----------------+   |
+    | ClipDataHandle |   |    | ClipDataHandle |   |    | ClipDataHandle |   |
+    | Spatial index  |   |    | Spatial index  |   |    | Spatial index  |   |
+    | Parent Id      |___|    | Parent Id      |___|    | Parent Id      |___|
+    | ...            |        | ...            |        | ...            |
+    +----------------+        +----------------+        +----------------+
 
  ClipChainInstance - A ClipChain that has been built for a specific primitive + positioning node.
 
-    When given a clip chain ID, and a local primitive rect + spatial node, the clip module
+    When given a clip chain ID, and a local primitive rect and its spatial node, the clip module
     creates a clip chain instance. This is a struct with various pieces of useful information
-    (such as a local clip rect and affected local bounding rect). It also contains a (index, count)
-    range specifier into an index buffer of the ClipNode structures that are actually relevant
+    (such as a local clip rect). It also contains a (index, count)
+    range specifier into an index buffer of the ClipNodeInstance structures that are actually relevant
     for this clip chain instance. The index buffer structure allows a single array to be used for
     all of the clip-chain instances built in a single frame. Each entry in the index buffer
     also stores some flags relevant to the clip node in this positioning context.
 
     +----------------------+
     | ClipChainInstance    |
     +----------------------+
-    | local_clip_rect      |
-    | local_bounding_rect  |________________________________________________________________________
+    | ...                  |
+    | local_clip_rect      |________________________________________________________________________
     | clips_range          |_______________                                                        |
     +----------------------+              |                                                        |
                                           |                                                        |
     +------------------+------------------+------------------+------------------+------------------+
     | ClipNodeInstance | ClipNodeInstance | ClipNodeInstance | ClipNodeInstance | ClipNodeInstance |
     +------------------+------------------+------------------+------------------+------------------+
     | flags            | flags            | flags            | flags            | flags            |
-    | ClipNodeIndex    | ClipNodeIndex    | ClipNodeIndex    | ClipNodeIndex    | ClipNodeIndex    |
+    | ...              | ...              | ...              | ...              | ...              |
     +------------------+------------------+------------------+------------------+------------------+
 
  */
 
 // Type definitions for interning clip nodes.
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
@@ -201,22 +211,16 @@ impl ClipChainId {
 #[derive(Clone, Debug)]
 pub struct ClipChainNode {
     pub handle: ClipDataHandle,
     pub local_pos: LayoutPoint,
     pub spatial_node_index: SpatialNodeIndex,
     pub parent_clip_chain_id: ClipChainId,
 }
 
-// An index into the clip_nodes array.
-#[derive(Clone, Copy, Debug, PartialEq, Hash, Eq)]
-#[cfg_attr(feature = "capture", derive(Serialize))]
-#[cfg_attr(feature = "replay", derive(Deserialize))]
-pub struct ClipNodeIndex(pub u32);
-
 // When a clip node is found to be valid for a
 // clip chain instance, it's stored in an index
 // buffer style structure. This struct contains
 // an index to the node data itself, as well as
 // some flags describing how this clip node instance
 // is positioned.
 #[derive(Debug)]
 #[cfg_attr(feature = "capture", derive(Serialize))]