-
Notifications
You must be signed in to change notification settings - Fork 6k
Add test for external textures on Android #26109
Conversation
Ping @gaaclarke and @blasten for routing. |
...ario_app/android/app/src/main/java/dev/flutter/scenarios/ExternalTextureFlutterActivity.java
Outdated
Show resolved
Hide resolved
testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TestActivity.java
Show resolved
Hide resolved
I'm sorry, I skipped over this because rarely does anything Android have to do with me. The code LGTM and tests seem representative. I honestly don't know the Android integration tests system. It would be worth checking with @blasten there, @blasten ping me Monday if you want me to talk you through the context of the test. Let's get this guy merged asap, if it gets stuck somehow message me on chat. |
friendly ping @blasten |
The current process for checking in the golden files isn't accurately documented. I need to fix this issue. For the time being, you could go to the "Linux Android Scenarios" check page. Check the output of Scenario App Integration Tests to see which tests have failed. The latest ones are these. Find the "gsutil upload "flutter/{something}/diff_failures.zip". The latest one is this zip. Replace the .png files in the engine repo that are different from the ones that end with |
return atomicCanProduceFrames.get(); | ||
} | ||
|
||
private void decodeThreadMain() { |
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.
Is the logic below strictly necessary? Ideally, the test would be as simple as possible if it can capture the behavior you want to make sure doesn't break.
class DisplayTexture extends Scenario { | ||
/// Creates the DisplayTexture scenario. | ||
/// | ||
/// The [dispatcher] parameter must not be null. |
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.
our style docs mentions that it's preferred to avoid comments that can otherwise be communicated through the type system or the method signature.
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.
Omitting the comment fails a lint check, so I don't think this can be removed. This matches whats done in other test scenarios.
The problem with using Most of the issues with external textures are from Flutter not supporting rotations and crops correctly, which is what #24888 fixes. If Android made it easy to specify rotations and crops, this PR would be simple. |
I see. Thanks for the explanation @ds84182. My only last comment would be to add more comments to test code. |
@blasten Looks like the diff failures are for other scenario tests. Should I still add them to the PR? |
I saw that. Yes. That sounds good |
@blasten Another review after the latest updates? |
This is waiting on #24888. Other than that LGTM |
Actually the opposite, #24888 is waiting on this CL since it's the only way to verify the changes are correct. |
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
The Firebase Test Lab failures look related to this patch. Can we ensure presubmits pass please? |
The linux presubmit failure is just a minor formatting fix. I am not sure how to troubleshoot the Firebase Test Lab failure. Perhaps @blasten can help? |
android:windowSoftInputMode="adjustResize" | ||
android:theme="@style/FullScreenScreenshot"> | ||
<intent-filter> | ||
<action android:name="com.google.intent.action.TEST_LOOP" /> |
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.
this seems correct. I wonder if the issue is that only one activity can have this action. What happens if you remove the content of the outer <intent-filter>
?
Any updates here? |
Closing this as stale. Please reopen if progress is possible and once the conflicts are solved. |
@ds84182 feel free to reach out to me if you'd like to try to land your change. I know it's very painful to contribute to some of our repos, but we are trying to improve that. |
This PR adds three tiers of tests for external texture rendering, along with comparisons for Android's SurfaceView.
Part of #24888
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.