| 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 | 7 |
| 8 import 'package:vector_math/vector_math.dart'; | 8 import 'package:vector_math/vector_math.dart'; |
| 9 | 9 |
| 10 import '../base/debug.dart'; | 10 import '../base/debug.dart'; |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 src = url; | 897 src = url; |
| 898 } | 898 } |
| 899 | 899 |
| 900 sky.Image _image; | 900 sky.Image _image; |
| 901 String _src; | 901 String _src; |
| 902 String get src => _src; | 902 String get src => _src; |
| 903 void set src (String value) { | 903 void set src (String value) { |
| 904 if (value == _src) | 904 if (value == _src) |
| 905 return; | 905 return; |
| 906 _src = value; | 906 _src = value; |
| 907 image_cache.load(_src, (result) { | 907 image_cache.load(_src).then((result) { |
| 908 _image = result; | 908 _image = result; |
| 909 if (requestedSize.width == null || requestedSize.height == null) | 909 if (requestedSize.width == null || requestedSize.height == null) |
| 910 markNeedsLayout(); | 910 markNeedsLayout(); |
| 911 markNeedsPaint(); | 911 markNeedsPaint(); |
| 912 }); | 912 }); |
| 913 } | 913 } |
| 914 | 914 |
| 915 Size _requestedSize; | 915 Size _requestedSize; |
| 916 Size get requestedSize => _requestedSize; | 916 Size get requestedSize => _requestedSize; |
| 917 void set requestedSize (Size value) { | 917 void set requestedSize (Size value) { |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 | 1304 |
| 1305 void defaultPaint(PaintingCanvas canvas, Offset offset) { | 1305 void defaultPaint(PaintingCanvas canvas, Offset offset) { |
| 1306 RenderBox child = firstChild; | 1306 RenderBox child = firstChild; |
| 1307 while (child != null) { | 1307 while (child != null) { |
| 1308 assert(child.parentData is ParentDataType); | 1308 assert(child.parentData is ParentDataType); |
| 1309 canvas.paintChild(child, child.parentData.position + offset); | 1309 canvas.paintChild(child, child.parentData.position + offset); |
| 1310 child = child.parentData.nextSibling; | 1310 child = child.parentData.nextSibling; |
| 1311 } | 1311 } |
| 1312 } | 1312 } |
| 1313 } | 1313 } |
| OLD | NEW |