| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 import 'dart:sky' as sky; | 6 import 'dart:sky' as sky; |
| 7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
| 8 import 'object.dart'; | 8 import 'object.dart'; |
| 9 import 'package:vector_math/vector_math.dart'; | 9 import 'package:vector_math/vector_math.dart'; |
| 10 import 'package:sky/framework/net/image_cache.dart' as image_cache; | 10 import 'package:sky/framework/net/image_cache.dart' as image_cache; |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 return paint; | 659 return paint; |
| 660 } | 660 } |
| 661 | 661 |
| 662 void paint(RenderObjectDisplayList canvas) { | 662 void paint(RenderObjectDisplayList canvas) { |
| 663 sky.Paint paint = _createShadowPaint(_shadow); | 663 sky.Paint paint = _createShadowPaint(_shadow); |
| 664 canvas.drawRect(new sky.Rect.fromLTRB(0.0, 0.0, size.width, size.height), pa
int); | 664 canvas.drawRect(new sky.Rect.fromLTRB(0.0, 0.0, size.width, size.height), pa
int); |
| 665 super.paint(canvas); | 665 super.paint(canvas); |
| 666 } | 666 } |
| 667 } | 667 } |
| 668 | 668 |
| 669 typedef void CustomPaintCallback(RenderObjectDisplayList canvas); | 669 typedef void CustomPaintCallback(sky.Canvas canvas); |
| 670 | 670 |
| 671 class RenderCustomPaint extends RenderProxyBox { | 671 class RenderCustomPaint extends RenderProxyBox { |
| 672 | 672 |
| 673 RenderCustomPaint({ | 673 RenderCustomPaint({ |
| 674 CustomPaintCallback callback, | 674 CustomPaintCallback callback, |
| 675 RenderBox child | 675 RenderBox child |
| 676 }) : super(child) { | 676 }) : super(child) { |
| 677 assert(callback != null); | 677 assert(callback != null); |
| 678 _callback = callback; | 678 _callback = callback; |
| 679 } | 679 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 | 793 |
| 794 void defaultPaint(RenderObjectDisplayList canvas) { | 794 void defaultPaint(RenderObjectDisplayList canvas) { |
| 795 RenderBox child = firstChild; | 795 RenderBox child = firstChild; |
| 796 while (child != null) { | 796 while (child != null) { |
| 797 assert(child.parentData is ParentDataType); | 797 assert(child.parentData is ParentDataType); |
| 798 canvas.paintChild(child, child.parentData.position); | 798 canvas.paintChild(child, child.parentData.position); |
| 799 child = child.parentData.nextSibling; | 799 child = child.parentData.nextSibling; |
| 800 } | 800 } |
| 801 } | 801 } |
| 802 } | 802 } |
| OLD | NEW |