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

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

Issue 1791543005: InPrePaint document state and PrePaintTreeWalk class (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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # `Source/core/paint` 1 # `Source/core/paint`
2 2
3 This directory contains implementation of painters of layout objects. 3 This directory contains implementation of painters of layout objects. It covers
4 the following document lifecycle states:
5
6 * PaintInvalidation (`InPaintInvalidation` and `PaintInvalidationClean`)
7 * PrePaint (`InPrePaint` and `PrePaintClean`)
8 * Paint (`InPaint` and `PaintClean`)
4 9
5 ## Glossaries 10 ## Glossaries
6 11
7 ### Stacked elements and stacking contexts 12 ### Stacked elements and stacking contexts
8 13
9 This chapter is basically a clarification of [CSS 2.1 appendix E. Elaborate desc ription 14 This chapter is basically a clarification of [CSS 2.1 appendix E. Elaborate desc ription
10 of Stacking Contexts](http://www.w3.org/TR/CSS21/zindex.html). 15 of Stacking Contexts](http://www.w3.org/TR/CSS21/zindex.html).
11 16
12 Note: we use 'element' instead of 'object' in this chapter to keep consistency w ith 17 Note: we use 'element' instead of 'object' in this chapter to keep consistency w ith
13 the spec. We use 'object' in other places in this document. 18 the spec. We use 'object' in other places in this document.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 * The normal paint invalidation is based on whole LayoutObject's, not aware of the first line. 186 * The normal paint invalidation is based on whole LayoutObject's, not aware of the first line.
182 187
183 We have a special path for first line style change: the style system informs the layout system 188 We have a special path for first line style change: the style system informs the layout system
184 when the computed first-line style changes through `LayoutObject::firstLineStyle DidChange()`. 189 when the computed first-line style changes through `LayoutObject::firstLineStyle DidChange()`.
185 When this happens, we invalidate all `InlineBox`es in the first line. 190 When this happens, we invalidate all `InlineBox`es in the first line.
186 191
187 ### Slimming paint v2 192 ### Slimming paint v2
188 193
189 TODO(wangxianzhu): add details 194 TODO(wangxianzhu): add details
190 195
196 ## [`PrePaintTreeWalk`](PrePaintTreeWalk.h) (Slimming paint v2 only)
197
198 During `InPrePaint` document lifecycle state, this class is called to walk the w hole
199 layout tree, beginning from the root FrameView, across frame boundaries. We do t he
200 following during the tree walk:
201
202 * Building paint property tree: creates paint property tree nodes for special
203 things in the layout tree, including but not limit to: overflow clip, transf orm,
204 fixed-pos, animation, mask, filter, etc.
205
206 * Paint invalidation: Not implemented yet. TODO(wangxianzhu): add details afte r
207 it's implemented.
208
191 ## Paint result caching 209 ## Paint result caching
192 210
193 `PaintController` holds the previous painting result as a cache of display items . 211 `PaintController` holds the previous painting result as a cache of display items .
194 If some painter would generate results same as those of the previous painting, 212 If some painter would generate results same as those of the previous painting,
195 we'll skip the painting and reuse the display items from cache. 213 we'll skip the painting and reuse the display items from cache.
196 214
197 ### Display item caching 215 ### Display item caching
198 216
199 We'll create a `CachedDisplayItem` when a painter would create a `DrawingDisplay Item` exactly 217 We'll create a `CachedDisplayItem` when a painter would create a `DrawingDisplay Item` exactly
200 the same as the display item created in the previous painting. After painting, ` PaintController` 218 the same as the display item created in the previous painting. After painting, ` PaintController`
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 253
236 When layer structure changes, and we are not invalidate paint of the changed sub tree, 254 When layer structure changes, and we are not invalidate paint of the changed sub tree,
237 we need to manually update the `needsPaintPhaseXXX` flags. For example, if an ob ject changes 255 we need to manually update the `needsPaintPhaseXXX` flags. For example, if an ob ject changes
238 style and creates a self-painting-layer, we copy the flags from its containing s elf-painting 256 style and creates a self-painting-layer, we copy the flags from its containing s elf-painting
239 layer to this layer, assuming that this layer needs all paint phases that its co ntainer 257 layer to this layer, assuming that this layer needs all paint phases that its co ntainer
240 self-painting layer needs. 258 self-painting layer needs.
241 259
242 We could update the `needsPaintPhaseXXX` flags in a separate tree walk, but that would regress 260 We could update the `needsPaintPhaseXXX` flags in a separate tree walk, but that would regress
243 performance of the first paint. For slimming paint v2, we can update the flags d uring the 261 performance of the first paint. For slimming paint v2, we can update the flags d uring the
244 pre-painting tree walk to simplify the logics. 262 pre-painting tree walk to simplify the logics.
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698