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

Side by Side Diff: sky/sdk/lib/rendering/README.md

Issue 1190123003: Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia co… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: j/k -- this one should actually be fully merged and testable Created 5 years, 5 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 Sky Rendering 1 Sky Rendering
2 ============= 2 =============
3 3
4 The Sky render tree is a low-level layout and painting system based on a 4 The Sky render tree is a low-level layout and painting system based on a
5 retained tree of objects that inherit from [`RenderObject`](object.dart). Most 5 retained tree of objects that inherit from [`RenderObject`](object.dart). Most
6 developers using Sky will not need to interact directly with the rendering tree. 6 developers using Sky will not need to interact directly with the rendering tree.
7 Instead, most developers should use [Sky widgets](../widgets/README.md), which 7 Instead, most developers should use [Sky widgets](../widgets/README.md), which
8 are built using the render tree. 8 are built using the render tree.
9 9
10 Base Model 10 Base Model
(...skipping 24 matching lines...) Expand all
35 35
36 * Implementations of `performLayout` are expected to call `layout` on their 36 * Implementations of `performLayout` are expected to call `layout` on their
37 children. When calling `layout`, a `RenderObject` must use the 37 children. When calling `layout`, a `RenderObject` must use the
38 `parentUsesSize` parameter to declare whether its `performLayout` function 38 `parentUsesSize` parameter to declare whether its `performLayout` function
39 depends on information read from the child. If the parent doesn't declare 39 depends on information read from the child. If the parent doesn't declare
40 that it uses the child's size, the edge from the parent to the child becomes 40 that it uses the child's size, the edge from the parent to the child becomes
41 a _relayout boundary_, which means the child (and its subtree) might undergo 41 a _relayout boundary_, which means the child (and its subtree) might undergo
42 layout without the parent undergoing layout. 42 layout without the parent undergoing layout.
43 43
44 * Subclasses of `RenderObject` must implement a `paint` function that draws a 44 * Subclasses of `RenderObject` must implement a `paint` function that draws a
45 visual representation of the object onto an `RenderObjectDisplayList`. If 45 visual representation of the object onto a `RenderCanvas`. If
46 the `RenderObject` has children, the `RenderObject` is responsible for 46 the `RenderObject` has children, the `RenderObject` is responsible for
47 painting its children using the `paintChild` function. 47 painting its children using the `paintChild` function on the `RenderCanvas`.
48 48
49 * Subclasses of `RenderObject` must call `adoptChild` whenever they add a 49 * Subclasses of `RenderObject` must call `adoptChild` whenever they add a
50 child. Similarly, they must call `dropChild` whenever they remove a child. 50 child. Similarly, they must call `dropChild` whenever they remove a child.
51 51
52 * Most subclasses of `RenderObject` will implement a `hitTest` function that 52 * Most subclasses of `RenderObject` will implement a `hitTest` function that
53 lets clients query the render tree for objects that intersect with a given 53 lets clients query the render tree for objects that intersect with a given
54 user input location. `RenderObject` itself does not impose a particular 54 user input location. `RenderObject` itself does not impose a particular
55 type signature on `hitTest`, but most implementations will take an argument 55 type signature on `hitTest`, but most implementations will take an argument
56 of type `HitTestResult` (or, more likely, a model-specific subclass of 56 of type `HitTestResult` (or, more likely, a model-specific subclass of
57 `HitTestResult`) as well as an object that describes the location at which 57 `HitTestResult`) as well as an object that describes the location at which
(...skipping 26 matching lines...) Expand all
84 Bespoke Models 84 Bespoke Models
85 -------------- 85 --------------
86 86
87 87
88 Dependencies 88 Dependencies
89 ------------ 89 ------------
90 90
91 * [`package:sky/base`](../base) 91 * [`package:sky/base`](../base)
92 * [`package:sky/mojo`](../mojo) 92 * [`package:sky/mojo`](../mojo)
93 * [`package:sky/animation`](../mojo) 93 * [`package:sky/animation`](../mojo)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698