Add PaintingContext which has-a sky.Canvas instead of is-a sky.Canvas

We'll need this for compositing because we need to switch out the sky.Canvas
when we switch compositing layers.
This commit is contained in:
Adam Barth
2015-08-13 10:18:33 -07:00
parent 7295563d7a
commit c80603cf0e
15 changed files with 144 additions and 127 deletions

View File

@@ -321,7 +321,8 @@ class SpriteBox extends RenderBox {
_rootNode._invalidateToBoxTransformMatrix();
}
void paint(PaintingCanvas canvas, Offset offset) {
void paint(PaintingContext context, Offset offset) {
final PaintingCanvas canvas = context.canvas;
canvas.save();
// Move to correct coordinate space before drawing