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

Add test for external textures on Android #31642

Merged
merged 10 commits into from
Mar 25, 2022
Merged

Conversation

ds84182
Copy link
Contributor

@ds84182 ds84182 commented Feb 24, 2022

This PR (originally #26109) adds three tiers of tests for external texture rendering, along with comparisons for Android's SurfaceView.

  • Identity transforms
  • Surface rotations. This requires decoding a video through MediaCodec with the rotation parameter set. Android framework source basically passes through the rotation parameter to the underlying Surface.
  • Surface crops, and surface rotations + crops. This requires the use of ImageReader (21+) and ImageWriter (23+). MediaCodec presents directly into the ImageReader, the crop rect is set on the acquired Images, and then the images are sent to ImageWriter which presents to the screen. The crop rect (which we now control) and rotation (passed from MediaCodec) are applied directly to the underlying Surface. Note that "Image" is a bit of a misnomer, they're actually just presentable hardware buffers.

Current screenshots show how Flutter's rendering is incorrect, which is what #24888 is supposed to address.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@ds84182 ds84182 requested review from blasten and gaaclarke February 24, 2022 01:01
Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

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

LGTM - This tests are currently not triggered though: flutter/flutter#90401

@ds84182
Copy link
Contributor Author

ds84182 commented Mar 9, 2022

Hm alright. Hopefully these tests can run in the future, since having some verification for this is very useful.

@chinmaygarde
Copy link
Member

I believe this needs a rebase for the tests.

@chinmaygarde
Copy link
Member

Any update on the rebase?

@ds84182
Copy link
Contributor Author

ds84182 commented Mar 24, 2022

Rebased, sorry for the delay.

@ds84182 ds84182 merged commit 6096dd1 into flutter:main Mar 25, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 25, 2022
zanderso pushed a commit to flutter/flutter that referenced this pull request Mar 25, 2022
* 0defb26 Add gclient parser. (flutter/engine#32135)

* b8ff8f1 Roll impeller to 0ce2e789fc0852d6d9ee63fb68097327447cd7d8 (flutter/engine#32264)

* 6096dd1 Add test for external textures on Android (flutter/engine#31642)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants