Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@liyuqian
Copy link
Contributor

@liyuqian liyuqian commented Apr 5, 2019

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 TextField widget inside an Opacity widget.


// 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);
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or SkMatrix::reset()

Copy link
Contributor Author

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.

Copy link
Member

@chinmaygarde chinmaygarde left a 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.


// 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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or SkMatrix::reset()

@liyuqian liyuqian merged commit 0c2a2c1 into flutter:master Apr 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
liyuqian added a commit to liyuqian/flutter that referenced this pull request Apr 6, 2019
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Apr 6, 2019
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.
RBogie pushed a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
@liyuqian liyuqian deleted the fix_opacity branch April 9, 2019 17:48
@Hixie
Copy link
Contributor

Hixie commented Apr 9, 2019

test?

@liyuqian
Copy link
Contributor Author

liyuqian commented Apr 9, 2019

I still haven't finished the test in my local branch. It seems that our flutter test suppressed all Skia asserts. Will figure that out after the shader compilation issue. Meanwhile, how do you think about the test in flutter/flutter#30747, @Hixie ?

chingjun pushed a commit to chingjun/engine that referenced this pull request Apr 11, 2019
chingjun added a commit that referenced this pull request Apr 11, 2019
chingjun added a commit to chingjun/flutter that referenced this pull request Apr 11, 2019
Hixie pushed a commit to flutter/flutter that referenced this pull request Apr 12, 2019
liyuqian added a commit to liyuqian/engine that referenced this pull request Apr 15, 2019
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.
liyuqian added a commit to liyuqian/engine that referenced this pull request Apr 15, 2019
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.
@liyuqian
Copy link
Contributor Author

@Hixie : please see the test in flutter/flutter#31097

liyuqian added a commit that referenced this pull request Apr 17, 2019
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opacity layer's child transform matrix is not initialized

5 participants