| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 which defines the coordinate space in which the content should be painted. | 46 which defines the coordinate space in which the content should be painted. |
| 47 | 47 |
| 48 Each transform node has: | 48 Each transform node has: |
| 49 | 49 |
| 50 * a 4x4 [`TransformationMatrix`](../../transforms/TransformationMatrix.h) | 50 * a 4x4 [`TransformationMatrix`](../../transforms/TransformationMatrix.h) |
| 51 * a 3-dimensional transform origin, which defines the origin relative to which | 51 * a 3-dimensional transform origin, which defines the origin relative to which |
| 52 the transformation matrix should be applied (e.g. a rotation applied with some | 52 the transformation matrix should be applied (e.g. a rotation applied with some |
| 53 transform origin will rotate the plane about that point) | 53 transform origin will rotate the plane about that point) |
| 54 * a pointer to the parent node, which defines the coordinate space relative to | 54 * a pointer to the parent node, which defines the coordinate space relative to |
| 55 which the above should be interpreted | 55 which the above should be interpreted |
| 56 * a pointer to a transform node which establishes a 3D rendering context (i.e. a |
| 57 set of transform nodes whose content is 3D sorted) |
| 58 * an enum which specifies whether transforms of child transform nodes are |
| 59 flattened into the plane of this transform node |
| 56 | 60 |
| 57 The parent node pointers link the transform nodes in a hierarchy (the *transform | 61 The parent node pointers link the transform nodes in a hierarchy (the *transform |
| 58 tree*), which defines how the transform for any painted content can be | 62 tree*), which defines how the transform for any painted content can be |
| 59 determined. | 63 determined. |
| 60 | 64 |
| 61 ***promo | 65 ***promo |
| 62 The painting system may create transform nodes which don't affect the position | 66 The painting system may create transform nodes which don't affect the position |
| 63 of points in the xy-plane, but which have an apparent effect only when | 67 of points in the xy-plane, but which have an apparent effect only when |
| 64 multiplied with other transformation matrices. In particular, a transform node | 68 multiplied with other transformation matrices. In particular, a transform node |
| 65 may be created to establish a perspective matrix for descendant transforms in | 69 may be created to establish a perspective matrix for descendant transforms in |
| 66 order to create the illusion of depth. | 70 order to create the illusion of depth. |
| 67 *** | 71 *** |
| 68 | 72 |
| 69 *** aside | 73 Note that, even though CSS does not permit it in the DOM, the transform tree can |
| 70 TODO(jbroman): Explain flattening, etc., once it exists in the paint properties. | 74 have nodes that preserve 3D but nonetheless participate in, and establish, no |
| 71 *** | 75 rendering context. For example, it is necessary to preserve the 3D character of |
| 76 the perspective transform, but this does not imply any 3D sorting. |
| 72 | 77 |
| 73 ### Clips | 78 ### Clips |
| 74 | 79 |
| 75 Each paint chunk is associated with a [clip node](ClipPaintPropertyNode.h), | 80 Each paint chunk is associated with a [clip node](ClipPaintPropertyNode.h), |
| 76 which defines the raster region that will be applied on the canvas when | 81 which defines the raster region that will be applied on the canvas when |
| 77 the chunk is rastered. | 82 the chunk is rastered. |
| 78 | 83 |
| 79 Each clip node has: | 84 Each clip node has: |
| 80 | 85 |
| 81 * A float rect with (optionally) rounded corner radius. | 86 * A float rect with (optionally) rounded corner radius. |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 visual and transformed rects of display items in the coordinate space of ancesto
r | 246 visual and transformed rects of display items in the coordinate space of ancesto
r |
| 242 [`PropertyTreeState`](PropertyTreeState.h)s. | 247 [`PropertyTreeState`](PropertyTreeState.h)s. |
| 243 | 248 |
| 244 The transformed rect of a display item in an ancestor `PropertyTreeState` is tha
t | 249 The transformed rect of a display item in an ancestor `PropertyTreeState` is tha
t |
| 245 rect, multiplied by the transforms between the display item's `PropertyTreeState
` | 250 rect, multiplied by the transforms between the display item's `PropertyTreeState
` |
| 246 and the ancestors, then flattened into 2D. | 251 and the ancestors, then flattened into 2D. |
| 247 | 252 |
| 248 The visual rect of a display item in an ancestor `PropertyTreeState` is the inte
rsection | 253 The visual rect of a display item in an ancestor `PropertyTreeState` is the inte
rsection |
| 249 of all of the intermediate clips (transformed in to the ancestor state), with | 254 of all of the intermediate clips (transformed in to the ancestor state), with |
| 250 the display item's transformed rect. | 255 the display item's transformed rect. |
| OLD | NEW |