-
Notifications
You must be signed in to change notification settings - Fork 6k
Initialize OpacityLayer's matrix to identity #8467
Conversation
flow/layers/opacity_layer.cc
Outdated
|
|
||
| // Be careful: SkMatrix's default constructor doesn't initialize the matrix to | ||
| // identity. Hence we have to explicitly call SkMatrix::MakeTrans(0, 0). | ||
| SkMatrix identity = SkMatrix::MakeTrans(0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SkMatrix::setIdentity() is more idiomatic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or SkMatrix::reset()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I was trying to save one line since setIndentity requires two lines:
SkMatrix identity;
identity.setIdentity();
Will change to setIdentity() shortly.
chinmaygarde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after using one of the more idiomatic ways of setting a matrix to identity.
flow/layers/opacity_layer.cc
Outdated
|
|
||
| // Be careful: SkMatrix's default constructor doesn't initialize the matrix to | ||
| // identity. Hence we have to explicitly call SkMatrix::MakeTrans(0, 0). | ||
| SkMatrix identity = SkMatrix::MakeTrans(0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or SkMatrix::reset()
flutter/engine@6bc33b5...fea42a2 git log 6bc33b5..fea42a2 --no-merges --oneline fea42a2 Roll src/third_party/dart 9e1adc54a7..389ccc9000 (10 commits) d6cf2bd Roll src/third_party/dart da4ccd0855..9e1adc54a7 (3 commits) 0c2a2c1 Initialize OpacityLayer&flutter#39;s matrix to identity (flutter/engine#8467) 7fd4caf Roll src/third_party/dart 1ad11facec..da4ccd0855 (6 commits) d3fbaea Android Embedding PR25: Prevent black rectangle when launching FlutterActivity (flutter/engine#8460) 99da038 Document the leak_vm flag. (flutter/engine#8462) ce7c21c Log the correct function on error in the embedder. (flutter/engine#8461) e10d464 Improve path metrics tests and docs (flutter/engine#7851) 424045c Enable shutting down all root isolates in a VM. (flutter/engine#8457) 816e3dc Roll src/third_party/dart 907c514c89..1ad11facec (7 commits) 45dc353 Roll src/third_party/skia 0e35ce27e0e9..053b2939938c (10 commits) (flutter/engine#8458) This roll also includes manual fix for @mustCallSuper update: call the super method whenever possible, and suppress warnings in tests.
flutter/engine@6bc33b5...0c393d6 git log 6bc33b5..0c393d6 --no-merges --oneline 0c393d6 Roll dart back to 907c514c8937cf76e (flutter/engine#8473) fea42a2 Roll src/third_party/dart 9e1adc54a7..389ccc9000 (10 commits) d6cf2bd Roll src/third_party/dart da4ccd0855..9e1adc54a7 (3 commits) 0c2a2c1 Initialize OpacityLayer's matrix to identity (flutter/engine#8467) 7fd4caf Roll src/third_party/dart 1ad11facec..da4ccd0855 (6 commits) d3fbaea Android Embedding PR25: Prevent black rectangle when launching FlutterActivity (flutter/engine#8460) 99da038 Document the leak_vm flag. (flutter/engine#8462) ce7c21c Log the correct function on error in the embedder. (flutter/engine#8461) e10d464 Improve path metrics tests and docs (flutter/engine#7851) 424045c Enable shutting down all root isolates in a VM. (flutter/engine#8457) 816e3dc Roll src/third_party/dart 907c514c89..1ad11facec (7 commits) 45dc353 Roll src/third_party/skia 0e35ce27e0e9..053b2939938c (10 commits) (flutter/engine#8458) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
Should have flutter/flutter#30586 fixed once the engine rolls.
This reverts commit eb42b89.
This reverts commit eb42b89.
|
test? |
|
I still haven't finished the test in my local branch. It seems that our |
Should have flutter/flutter#30586 fixed once the engine rolls.
Should have flutter/flutter#30586 fixed once the engine rolls.
Apply hotfix from flutter/engine#8548 flutter/engine@4737fc5cd Initialize OpacityLayer's matrix to identity (flutter/engine#8467) (flutter/engine#8548)
Apply hotfix from flutter/engine#8548 flutter/engine@4737fc5cd Initialize OpacityLayer's matrix to identity (flutter/engine#8467) (flutter/engine#8548)
To catch issues like flutter/flutter#30586 We'll also upload a test in the framework that will trigger this DCHECK if flutter#8467 were reverted.
To catch issues like flutter/flutter#30586 We'll also upload a test in the framework that will trigger this DCHECK if flutter#8467 were reverted.
|
@Hixie : please see the test in flutter/flutter#31097 |
To catch issues like flutter/flutter#30586 flutter/flutter#31097 will trigger this CHECK if #8467 were reverted and the transform_ were not initialized in this PR.
Fixes flutter/flutter#30586
Will try to add a test to framework to catch this. From my local test, SkASSERT should trigger during debug build for a
TextFieldwidget inside anOpacitywidget.