| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 double det = inverse.copyInverse(_transform); | 535 double det = inverse.copyInverse(_transform); |
| 536 // TODO(abarth): Check the determinant for degeneracy. | 536 // TODO(abarth): Check the determinant for degeneracy. |
| 537 | 537 |
| 538 Vector3 position3 = new Vector3(position.x, position.y, 0.0); | 538 Vector3 position3 = new Vector3(position.x, position.y, 0.0); |
| 539 Vector3 transformed3 = inverse.transform3(position3); | 539 Vector3 transformed3 = inverse.transform3(position3); |
| 540 sky.Point transformed = new sky.Point(transformed3.x, transformed3.y); | 540 sky.Point transformed = new sky.Point(transformed3.x, transformed3.y); |
| 541 super.hitTestChildren(result, position: transformed); | 541 super.hitTestChildren(result, position: transformed); |
| 542 } | 542 } |
| 543 | 543 |
| 544 void paint(RenderObjectDisplayList canvas) { | 544 void paint(RenderObjectDisplayList canvas) { |
| 545 Float32List storage = _transform.storage; | |
| 546 | |
| 547 canvas.save(); | 545 canvas.save(); |
| 548 canvas.concat([ | 546 canvas.concat(_transform.storage); |
| 549 storage[ 0], storage[ 4], storage[12], | |
| 550 storage[ 1], storage[ 5], storage[13], | |
| 551 storage[ 3], storage[ 7], storage[15], | |
| 552 ]); | |
| 553 super.paint(canvas); | 547 super.paint(canvas); |
| 554 canvas.restore(); | 548 canvas.restore(); |
| 555 } | 549 } |
| 556 } | 550 } |
| 557 | 551 |
| 558 | 552 |
| 559 // RENDER VIEW LAYOUT MANAGER | 553 // RENDER VIEW LAYOUT MANAGER |
| 560 | 554 |
| 561 class ViewConstraints { | 555 class ViewConstraints { |
| 562 | 556 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 | 650 |
| 657 void defaultPaint(RenderObjectDisplayList canvas) { | 651 void defaultPaint(RenderObjectDisplayList canvas) { |
| 658 RenderBox child = firstChild; | 652 RenderBox child = firstChild; |
| 659 while (child != null) { | 653 while (child != null) { |
| 660 assert(child.parentData is ParentDataType); | 654 assert(child.parentData is ParentDataType); |
| 661 canvas.paintChild(child, child.parentData.position); | 655 canvas.paintChild(child, child.parentData.position); |
| 662 child = child.parentData.nextSibling; | 656 child = child.parentData.nextSibling; |
| 663 } | 657 } |
| 664 } | 658 } |
| 665 } | 659 } |
| OLD | NEW |