Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/README.md

Issue 2022563002: Remove display item scope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
133 list. 128 list, except for drawings that are marked uncacheable
129 (see [DisplayItemCacheSkipper](DisplayItemCacheSkipper.h)).
134 *** 130 ***
135 131
136 Generally, clients of this code should use stack-allocated recorder classes to 132 Generally, clients of this code should use stack-allocated recorder classes to
137 emit display items to a `PaintController` (using `GraphicsContext`). 133 emit display items to a `PaintController` (using `GraphicsContext`).
138 134
139 ### Standalone display items 135 ### Standalone display items
140 136
141 #### [CachedDisplayItem](CachedDisplayItem.h) 137 #### [CachedDisplayItem](CachedDisplayItem.h)
142 138
143 See [Display item caching](../../../core/paint/README.md#paint-result-caching). 139 See [Display item caching](../../../core/paint/README.md#paint-result-caching).
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 The [`PaintArtifactCompositor`](PaintArtifactCompositor.h) is responsible for 227 The [`PaintArtifactCompositor`](PaintArtifactCompositor.h) is responsible for
232 consuming the `PaintArtifact` produced by the `PaintController`, and converting 228 consuming the `PaintArtifact` produced by the `PaintController`, and converting
233 it into a form suitable for the compositor to consume. 229 it into a form suitable for the compositor to consume.
234 230
235 At present, `PaintArtifactCompositor` creates a cc layer tree, with one layer 231 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 232 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. 233 to combine paint chunks into a smaller number of layers.
238 234
239 The owner of the `PaintArtifactCompositor` (e.g. `WebView`) can then attach its 235 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. 236 root layer to the overall layer hierarchy to be displayed to the user.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698