Reduce per-frame GL calls in EGLRenderer

Uniforms are attached to the program object, so they don't need to
be set each time we swap between the YUV shader and the overlay
shader.

Since 0 overlays is by far the most common case and > 1 is highly
unlikely, move the glViewport() call into renderOverlay() to let
us skip it in the common case (and be no worse than today in the
2nd most common case of 1 overlay).
This commit is contained in:
Cameron Gutman
2025-11-06 17:46:07 -06:00
parent 9106f2c420
commit 8324f61db0
2 changed files with 30 additions and 23 deletions
@@ -63,9 +63,6 @@ private:
#define NV12_PARAM_PLANE1 3
#define NV12_PARAM_PLANE2 4
#define OPAQUE_PARAM_TEXTURE 0
std::array<float, 9> m_PremultipliedColorMatrix;
std::array<float, 3> m_YuvOffsets;
std::array<float, 2> m_ChromaOffset;
int m_ShaderProgramParams[5];
#define OVERLAY_PARAM_TEXTURE 0