Skip to content

Commit

Permalink
Overlay: Add javadoc for why we fly overlays vertically.
Browse files Browse the repository at this point in the history
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: #1128
PiperOrigin-RevId: 621544348
  • Loading branch information
dway123 authored and Copybara-Service committed Apr 3, 2024
1 parent f9b1c82 commit 60bb24a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ public int getTextureId(long presentationTimeUs) throws VideoFrameProcessingExce
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
Expand Down

0 comments on commit 60bb24a

Please sign in to comment.