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

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: Rebased version of previous patch Created 5 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 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 Overview 10 Overview
(...skipping 26 matching lines...) Expand all
37 37
38 * Implementations of `performLayout` are expected to call `layout` on their 38 * Implementations of `performLayout` are expected to call `layout` on their
39 children. When calling `layout`, a `RenderObject` must use the 39 children. When calling `layout`, a `RenderObject` must use the
40 `parentUsesSize` parameter to declare whether its `performLayout` function 40 `parentUsesSize` parameter to declare whether its `performLayout` function
41 depends on information read from the child. If the parent doesn't declare 41 depends on information read from the child. If the parent doesn't declare
42 that it uses the child's size, the edge from the parent to the child becomes 42 that it uses the child's size, the edge from the parent to the child becomes
43 a _relayout boundary_, which means the child (and its subtree) might undergo 43 a _relayout boundary_, which means the child (and its subtree) might undergo
44 layout without the parent undergoing layout. 44 layout without the parent undergoing layout.
45 45
46 * Subclasses of `RenderObject` must implement a `paint` function that draws a 46 * Subclasses of `RenderObject` must implement a `paint` function that draws a
47 visual representation of the object onto an `RenderObjectDisplayList`. If 47 visual representation of the object onto a `RenderCanvas`. If
48 the `RenderObject` has children, the `RenderObject` is responsible for 48 the `RenderObject` has children, the `RenderObject` is responsible for
49 painting its children using the `paintChild` function. 49 painting its children using the `paintChild` function on the `RenderCanvas`.
50 50
51 * Subclasses of `RenderObject` must call `adoptChild` whenever they add a 51 * Subclasses of `RenderObject` must call `adoptChild` whenever they add a
52 child. Similarly, they must call `dropChild` whenever they remove a child. 52 child. Similarly, they must call `dropChild` whenever they remove a child.
53 53
54 * Most subclasses of `RenderObject` will implement a `hitTest` function that 54 * Most subclasses of `RenderObject` will implement a `hitTest` function that
55 lets clients query the render tree for objects that intersect with a given 55 lets clients query the render tree for objects that intersect with a given
56 user input location. `RenderObject` itself does not impose a particular 56 user input location. `RenderObject` itself does not impose a particular
57 type signature on `hitTest`, but most implementations will take an argument 57 type signature on `hitTest`, but most implementations will take an argument
58 of type `HitTestResult` (or, more likely, a model-specific subclass of 58 of type `HitTestResult` (or, more likely, a model-specific subclass of
59 `HitTestResult`) as well as an object that describes the location at which 59 `HitTestResult`) as well as an object that describes the location at which
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 * Avoid using save/restore on canvases. 136 * Avoid using save/restore on canvases.
137 137
138 138
139 Dependencies 139 Dependencies
140 ------------ 140 ------------
141 141
142 * [`package:sky/base`](../base) 142 * [`package:sky/base`](../base)
143 * [`package:sky/mojo`](../mojo) 143 * [`package:sky/mojo`](../mojo)
144 * [`package:sky/animation`](../mojo) 144 * [`package:sky/animation`](../mojo)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698