Skip to content

Deprecate crop/rotation support for Android plugins, consider Dart alternative #144407

@johnmccutchan

Description

@johnmccutchan

The tests as written today are testing Android features and code paths that aren't consistently supported on Android and thus can't be used. Also of note, these functions are not used by our popular plugins.

There are three paths currently tested today:

  1. MediaRenderer (applies rotation) -> ImageRenderer (applies crop) -> SurfaceView [correctly handles crop and rotation]
  2. MediaRenderer (applies rotation) -> ImageRenderer (applies crop) -> SurfaceProducer(ST-backed) [correctly handles crop and rotation]
  3. MediaRenderer (applies rotation) -> ImageRenderer (applies crop) -> SurfaceProducer(IR-backed) [does not handle crop or rotation]

Due to an oversight by Android, ImageReader backed surfaces do not respect metadata applied to the surface (rotation & crop). Rotation information is not available at all and crop information is corrupted by the ImageReader (only the width/height is propagated the origin offset is not).

Two action items:

  • We need to replace the Android code with Dart based texture rotation and cropping.
  • We need to make the SurfaceTexture backend ignore the crop and rotation metadata when we render so that it is consistent with ImageReader. We can/should probably make this behaviour SurfaceProducer specific so we don't break any legacy apps.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listfyi-androidFor the attention of Android platform teamplatform-androidAndroid applications specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions