| 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 |
| 11 drawings, and a list of paint chunks, stored together. | 11 drawings, and a list of paint chunks, stored together. |
| 12 | 12 |
| 13 This document explains the SPv2 world as it develops, not the SPv1 world it | 13 This document explains the SPv2 world as it develops, not the SPv1 world it |
| 14 replaces. | 14 replaces. |
| 15 | 15 |
| 16 [paint-team-site]: https://www.chromium.org/developers/paint-team | 16 [paint-team-site]: https://www.chromium.org/developers/paint-team |
| 17 | 17 |
| 18 ## Paint artifact | 18 ## Paint artifact |
| 19 | 19 |
| 20 The SPv2 paint artifact consists of a list of display items (ideally mostly or | 20 The SPv2 [paint artifact](PaintArtifact.h) consists of a list of display items |
| 21 all drawings), partitioned into *paint chunks* which define certain *paint | 21 (ideally mostly or all drawings), partitioned into *paint chunks* which define |
| 22 properties* which affect how the content should be drawn or composited. | 22 certain *paint properties* which affect how the content should be drawn or |
| 23 composited. |
| 23 | 24 |
| 24 ## Paint properties | 25 ## Paint properties |
| 25 | 26 |
| 26 Paint properties define characteristics of how a paint chunk should be drawn, | 27 Paint properties define characteristics of how a paint chunk should be drawn, |
| 27 such as the transform it should be drawn with. To enable efficient updates, | 28 such as the transform it should be drawn with. To enable efficient updates, |
| 28 a chunk's paint properties are described hierarchically. For instance, each | 29 a chunk's paint properties are described hierarchically. For instance, each |
| 29 chunk is associated with a transform node, whose matrix should be multiplied by | 30 chunk is associated with a transform node, whose matrix should be multiplied by |
| 30 its ancestor transform nodes in order to compute the final transformation matrix | 31 its ancestor transform nodes in order to compute the final transformation matrix |
| 31 to the screen. | 32 to the screen. |
| 32 | 33 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 When the new display items have been populated, clients call | 107 When the new display items have been populated, clients call |
| 107 `commitNewDisplayItems`, which merges the previous artifact with the new data, | 108 `commitNewDisplayItems`, which merges the previous artifact with the new data, |
| 108 producing a new paint artifact, where `CachedDisplayItem` objects have been | 109 producing a new paint artifact, where `CachedDisplayItem` objects have been |
| 109 replaced with the cached content from the previous artifact. | 110 replaced with the cached content from the previous artifact. |
| 110 | 111 |
| 111 At this point, the paint artifact is ready to be drawn or composited. | 112 At this point, the paint artifact is ready to be drawn or composited. |
| 112 | 113 |
| 113 *** aside | 114 *** aside |
| 114 TODO(jbroman): Explain invalidation. | 115 TODO(jbroman): Explain invalidation. |
| 115 *** | 116 *** |
| OLD | NEW |