AndroidGpuImageVideoRenderer
Turns direct MediaCodec output into immutable RGBA hardware Bitmap frames for a GPU client.
MediaCodec writes vendor YUV into an external-OES SurfaceTexture. One GLES2 shader pass writes RGBA_8888 into an ImageReader, and Bitmap.wrapHardwareBuffer gives the client a Skia-readable hardware image. No video pixels enter Kotlin or CPU memory.
The composited target preserves Android's exact SDR RGB spaces. Android 12+ decoders may feed it 10-bit/HDR sources by performing the platform's hardware HDR-to-SDR tone map first. The decoder must accept that request, and any recognized contradictory output metadata is rejected before a frame is exposed. The client callback may run on the renderer's GL thread and must return promptly. Subtitle composition remains the client's job.
Properties
Frames rejected or released without reaching the bridge Surface.
Frames whose completed RGBA hardware image reached onImage.
False: the blit runs at each latch only, so a held picture shows a change from a redraw (#463).
Frames coalesced by SurfaceTexture or skipped while no Compose viewport is active.
Functions
The render-quality passes. This tier blits OES to an RGBA8 image, so eight bits is what the dither spreads across; anything it cannot do it ignores, as the SPI allows.
The viewer's turn reaches the picture where Compose draws it; here it only sizes the buffer (#428).