dancho dc9854cc5b Add GlRect helper class
Adds a class that represents an image rectangle
in OpenGL coordinate convention.

android.graphics.Rect puts (0, 0) as the top-left corner:
it enforces `Rect.top <= Rect.bottom` and this matches
`android.graphics.Bitmap` coordinates: docs https://developer.android.com/reference/android/graphics/Rect

This is different from OpenGL coordinates where (0, 0) is
at the bottom-left corner. I.e. GlRect.bottom <= GlRect.top: docs https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glReadPixels.xhtml

The reason for this change is to allow a public API GlRect
getScaledRegion() which selects a region of pixels of a GL texture
to be copied to CPU memory.

PiperOrigin-RevId: 669231826
2024-08-30 01:13:22 -07:00
..
2024-08-30 01:13:22 -07:00
2021-10-27 09:12:46 +01:00

Common module

Provides common code and utilities used by other media modules. Application code will not normally need to depend on this module directly.