Skip to content

Commit

Permalink
Update sites to use new SkMatrix factories (#22871)
Browse files Browse the repository at this point in the history
SkMatrix is deprecating some of its factories. This must moves flutter tests to the new ones.

No expected change in runtime.
  • Loading branch information
mikerreed committed Dec 4, 2020
1 parent 1281b83 commit 59b4bae
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -160,10 +160,10 @@ - (void)testFlutterViewOnlyCreateOnceInOneFrame {
flutter::MutatorsStack stack;
// Layer tree always pushes a screen scale factor to the stack
SkMatrix screenScaleMatrix =
SkMatrix::MakeScale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
SkMatrix::Scale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
stack.PushTransform(screenScaleMatrix);
// Push a translate matrix
SkMatrix translateMatrix = SkMatrix::MakeTrans(100, 100);
SkMatrix translateMatrix = SkMatrix::Translate(100, 100);
stack.PushTransform(translateMatrix);
SkMatrix finalMatrix;
finalMatrix.setConcat(screenScaleMatrix, translateMatrix);
Expand Down Expand Up @@ -269,10 +269,10 @@ - (void)testCompositePlatformView {
flutter::MutatorsStack stack;
// Layer tree always pushes a screen scale factor to the stack
SkMatrix screenScaleMatrix =
SkMatrix::MakeScale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
SkMatrix::Scale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
stack.PushTransform(screenScaleMatrix);
// Push a translate matrix
SkMatrix translateMatrix = SkMatrix::MakeTrans(100, 100);
SkMatrix translateMatrix = SkMatrix::Translate(100, 100);
stack.PushTransform(translateMatrix);
SkMatrix finalMatrix;
finalMatrix.setConcat(screenScaleMatrix, translateMatrix);
Expand Down Expand Up @@ -323,7 +323,7 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView {
flutter::MutatorsStack stack;
// Layer tree always pushes a screen scale factor to the stack
SkMatrix screenScaleMatrix =
SkMatrix::MakeScale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
SkMatrix::Scale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
stack.PushTransform(screenScaleMatrix);
// Push a rotate matrix
SkMatrix rotateMatrix;
Expand Down Expand Up @@ -392,7 +392,7 @@ - (void)testClipRect {
flutter::MutatorsStack stack;
// Layer tree always pushes a screen scale factor to the stack
SkMatrix screenScaleMatrix =
SkMatrix::MakeScale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
SkMatrix::Scale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
stack.PushTransform(screenScaleMatrix);
// Push a clip rect
SkRect rect = SkRect::MakeXYWH(2, 2, 3, 3);
Expand Down Expand Up @@ -463,7 +463,7 @@ - (void)testClipRRect {
flutter::MutatorsStack stack;
// Layer tree always pushes a screen scale factor to the stack
SkMatrix screenScaleMatrix =
SkMatrix::MakeScale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
SkMatrix::Scale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
stack.PushTransform(screenScaleMatrix);
// Push a clip rrect
SkRRect rrect = SkRRect::MakeRectXY(SkRect::MakeXYWH(2, 2, 6, 6), 1, 1);
Expand Down Expand Up @@ -534,7 +534,7 @@ - (void)testClipPath {
flutter::MutatorsStack stack;
// Layer tree always pushes a screen scale factor to the stack
SkMatrix screenScaleMatrix =
SkMatrix::MakeScale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
SkMatrix::Scale([UIScreen mainScreen].scale, [UIScreen mainScreen].scale);
stack.PushTransform(screenScaleMatrix);
// Push a clip path
SkPath path;
Expand Down

0 comments on commit 59b4bae

Please sign in to comment.