Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1169583002: Fix regression in RenderTransform caused by change to Canvas.concat. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: . Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698