-
Notifications
You must be signed in to change notification settings - Fork 6k
Follow various best practices in FlutterRenderer
#49651
Follow various best practices in FlutterRenderer
#49651
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
c4077dd to
1f4eaf6
Compare
| waitOnFence(image); | ||
| return; | ||
| } | ||
| if (!ignoringFence) { |
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.
What happened here?
The instance starts with "ignoringFence = false" and this check is to ensure we only log the message once.
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.
Line 584 says:
if (ignoringFence) {
return;
}So in what case will if (ignoringFence) hold on line 592? Maybe I'm missing something subtle about multi-threaded access?
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.
Doh! I missed that if at the top. Sorry for the noise.
| // callback may still be called by a stale reference after released==true and | ||
| // mNativeView==null. | ||
| SurfaceTexture.OnFrameAvailableListener onFrameListener = | ||
| texture -> { |
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.
No action necessary: This is some wild syntax to me. I prefer the original as it actually lists the method name we are overloading- how does this syntax work when an interface has more than one method? I guess it doesn't work?
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.
I get it. I'd be open to reverting back to the previous syntax, but I think the point is there is only a single method (and the Java standard is moving towards lambdas for single-method overloads).
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.
I'm fine going with the flow.
…141240) flutter/engine@7e6f3d8...e57e418 2024-01-10 [email protected] Follow various best practices in `FlutterRenderer` (flutter/engine#49651) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
All of these are non-semantics changing and all were auto-applied by IntelliJ:
finalstuff final@NonNulloverrides<>when applicable