| 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:sky' as sky; |
| 6 |
| 5 import 'package:vector_math/vector_math.dart'; | 7 import 'package:vector_math/vector_math.dart'; |
| 6 | 8 |
| 7 import '../painting/text_style.dart'; | 9 import '../painting/text_style.dart'; |
| 8 import '../rendering/block.dart'; | 10 import '../rendering/block.dart'; |
| 9 import '../rendering/box.dart'; | 11 import '../rendering/box.dart'; |
| 10 import '../rendering/flex.dart'; | 12 import '../rendering/flex.dart'; |
| 11 import '../rendering/object.dart'; | 13 import '../rendering/object.dart'; |
| 12 import '../rendering/paragraph.dart'; | 14 import '../rendering/paragraph.dart'; |
| 13 import '../rendering/stack.dart'; | 15 import '../rendering/stack.dart'; |
| 14 import 'widget.dart'; | 16 import 'widget.dart'; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 29 final double opacity; | 31 final double opacity; |
| 30 | 32 |
| 31 RenderOpacity createNode() => new RenderOpacity(opacity: opacity); | 33 RenderOpacity createNode() => new RenderOpacity(opacity: opacity); |
| 32 | 34 |
| 33 void syncRenderObject(Opacity old) { | 35 void syncRenderObject(Opacity old) { |
| 34 super.syncRenderObject(old); | 36 super.syncRenderObject(old); |
| 35 root.opacity = opacity; | 37 root.opacity = opacity; |
| 36 } | 38 } |
| 37 } | 39 } |
| 38 | 40 |
| 41 class ColorFilter extends OneChildRenderObjectWrapper { |
| 42 ColorFilter({ String key, this.color, this.transferMode, Widget child }) |
| 43 : super(key: key, child: child); |
| 44 |
| 45 RenderColorFilter get root => super.root; |
| 46 final Color color; |
| 47 final sky.TransferMode transferMode; |
| 48 |
| 49 RenderColorFilter createNode() => new RenderColorFilter(color: color, transfer
Mode: transferMode); |
| 50 |
| 51 void syncRenderObject(ColorFilter old) { |
| 52 super.syncRenderObject(old); |
| 53 root.color = color; |
| 54 root.transferMode = transferMode; |
| 55 } |
| 56 } |
| 57 |
| 39 class DecoratedBox extends OneChildRenderObjectWrapper { | 58 class DecoratedBox extends OneChildRenderObjectWrapper { |
| 40 | 59 |
| 41 DecoratedBox({ String key, this.decoration, Widget child }) | 60 DecoratedBox({ String key, this.decoration, Widget child }) |
| 42 : super(key: key, child: child); | 61 : super(key: key, child: child); |
| 43 | 62 |
| 44 RenderDecoratedBox get root => super.root; | 63 RenderDecoratedBox get root => super.root; |
| 45 final BoxDecoration decoration; | 64 final BoxDecoration decoration; |
| 46 | 65 |
| 47 RenderDecoratedBox createNode() => new RenderDecoratedBox(decoration: decorati
on); | 66 RenderDecoratedBox createNode() => new RenderDecoratedBox(decoration: decorati
on); |
| 48 | 67 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 // WidgetToRenderBoxAdapter cannot have Widget children; by | 448 // WidgetToRenderBoxAdapter cannot have Widget children; by |
| 430 // definition, it is the transition out of the Widget world. | 449 // definition, it is the transition out of the Widget world. |
| 431 } | 450 } |
| 432 | 451 |
| 433 void remove() { | 452 void remove() { |
| 434 parent.detachChildRoot(this); | 453 parent.detachChildRoot(this); |
| 435 super.remove(); | 454 super.remove(); |
| 436 } | 455 } |
| 437 | 456 |
| 438 } | 457 } |
| OLD | NEW |