Overlay: Add javadoc for why we fly overlays vertically.

Otherwise, apps overriding BitmapOverlay.getVertexTransformation may not
realize this is being done, and may ask why bitmaps are flipped vertically from
what they expect

Reference: https://github.com/androidx/media/issues/1128
PiperOrigin-RevId: 621544348
This commit is contained in:
huangdarwin 2024-04-03 09:16:50 -07:00 committed by Copybara-Service
parent f9b1c82565
commit 60bb24a930

View File

@ -170,6 +170,12 @@ public abstract class BitmapOverlay extends TextureOverlay {
return lastTextureId;
}
/**
* {@inheritDoc}
*
* <p>Flips the overlay vertically to convert between Android and OpenGL texture coordinate
* systems.
*/
@Override
public float[] getVertexTransformation(long presentationTimeUs) {
// Whereas the Android system uses the top-left corner as (0,0) of the