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:
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue