Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Platform paint code | 1 # Platform paint code |
| 2 | 2 |
| 3 This directory contains the implementation of display lists and display | 3 This directory contains the implementation of display lists and display |
| 4 list-based painting, except for code which requires knowledge of `core/` | 4 list-based painting, except for code which requires knowledge of `core/` |
| 5 concepts, such as DOM elements and layout objects. | 5 concepts, such as DOM elements and layout objects. |
| 6 | 6 |
| 7 This code is owned by the [paint team][paint-team-site]. | 7 This code is owned by the [paint team][paint-team-site]. |
| 8 | 8 |
| 9 Slimming Paint v2 is currently being implemented. Unlike Slimming Paint v1, SPv2 | 9 Slimming Paint v2 is currently being implemented. Unlike Slimming Paint v1, SPv2 |
| 10 represents its paint artifact not as a flat display list, but as a list of | 10 represents its paint artifact not as a flat display list, but as a list of |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 exists, as well as effects other than opacity. | 111 exists, as well as effects other than opacity. |
| 112 *** | 112 *** |
| 113 | 113 |
| 114 ## Display items | 114 ## Display items |
| 115 | 115 |
| 116 A display item is the smallest unit of a display list in Blink. Each display | 116 A display item is the smallest unit of a display list in Blink. Each display |
| 117 item is identified by an ID consisting of: | 117 item is identified by an ID consisting of: |
| 118 | 118 |
| 119 * an opaque pointer to the *display item client* that produced it | 119 * an opaque pointer to the *display item client* that produced it |
| 120 * a type (from the `DisplayItem::Type` enum) | 120 * a type (from the `DisplayItem::Type` enum) |
| 121 * a scope number | |
| 122 | |
| 123 *** aside | |
| 124 TODO(jbroman): Explain scope numbers. | |
| 125 *** | |
| 126 | 121 |
| 127 In practice, display item clients are generally subclasses of `LayoutObject`, | 122 In practice, display item clients are generally subclasses of `LayoutObject`, |
| 128 but can be other Blink objects which get painted, such as inline boxes and drag | 123 but can be other Blink objects which get painted, such as inline boxes and drag |
| 129 images. | 124 images. |
| 130 | 125 |
| 131 *** note | 126 *** note |
| 132 It is illegal for there to be two drawings with the same ID in a display item | 127 It is illegal for there to be two drawings with the same ID in a display item |
|
chrishtr
2016/05/31 17:55:33
This CL makes it legal, so long as it is not cache
Xianzhu
2016/05/31 20:35:12
Done.
| |
| 133 list. | 128 list. |
| 134 *** | 129 *** |
| 135 | 130 |
| 136 Generally, clients of this code should use stack-allocated recorder classes to | 131 Generally, clients of this code should use stack-allocated recorder classes to |
| 137 emit display items to a `PaintController` (using `GraphicsContext`). | 132 emit display items to a `PaintController` (using `GraphicsContext`). |
| 138 | 133 |
| 139 ### Standalone display items | 134 ### Standalone display items |
| 140 | 135 |
| 141 #### [CachedDisplayItem](CachedDisplayItem.h) | 136 #### [CachedDisplayItem](CachedDisplayItem.h) |
| 142 | 137 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 The [`PaintArtifactCompositor`](PaintArtifactCompositor.h) is responsible for | 226 The [`PaintArtifactCompositor`](PaintArtifactCompositor.h) is responsible for |
| 232 consuming the `PaintArtifact` produced by the `PaintController`, and converting | 227 consuming the `PaintArtifact` produced by the `PaintController`, and converting |
| 233 it into a form suitable for the compositor to consume. | 228 it into a form suitable for the compositor to consume. |
| 234 | 229 |
| 235 At present, `PaintArtifactCompositor` creates a cc layer tree, with one layer | 230 At present, `PaintArtifactCompositor` creates a cc layer tree, with one layer |
| 236 for each paint chunk. In the future, it is expected that we will use heuristics | 231 for each paint chunk. In the future, it is expected that we will use heuristics |
| 237 to combine paint chunks into a smaller number of layers. | 232 to combine paint chunks into a smaller number of layers. |
| 238 | 233 |
| 239 The owner of the `PaintArtifactCompositor` (e.g. `WebView`) can then attach its | 234 The owner of the `PaintArtifactCompositor` (e.g. `WebView`) can then attach its |
| 240 root layer to the overall layer hierarchy to be displayed to the user. | 235 root layer to the overall layer hierarchy to be displayed to the user. |
| OLD | NEW |