зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1016086 - Part 4: Setup attribute configuration when we start compositing instead of for every draw command (r=Bas)
This commit is contained in:
Родитель
1ea7cf9b40
Коммит
1d8c6b36e5
|
@ -779,6 +779,16 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
|
||||
#endif
|
||||
|
||||
// Every shader uses a single attribute that we bind to mQuadVBO, which
|
||||
// contains the four (0,0)(1,1) quads we set up above.
|
||||
const GLuint coordAttribIndex = 0;
|
||||
|
||||
mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, mQuadVBO);
|
||||
mGLContext->fVertexAttribPointer(coordAttribIndex, 4,
|
||||
LOCAL_GL_FLOAT, LOCAL_GL_FALSE, 0,
|
||||
(GLvoid*) 0);
|
||||
mGLContext->fEnableVertexAttribArray(coordAttribIndex);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1523,14 +1533,6 @@ CompositorOGL::BindAndDrawQuads(ShaderProgramOGL *aProg,
|
|||
{
|
||||
NS_ASSERTION(aProg->HasInitialized(), "Shader program not correctly initialized");
|
||||
|
||||
const GLuint coordAttribIndex = 0;
|
||||
|
||||
mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, mQuadVBO);
|
||||
mGLContext->fVertexAttribPointer(coordAttribIndex, 4,
|
||||
LOCAL_GL_FLOAT, LOCAL_GL_FALSE, 0,
|
||||
(GLvoid*) 0);
|
||||
mGLContext->fEnableVertexAttribArray(coordAttribIndex);
|
||||
|
||||
aProg->SetLayerRects(aLayerRects);
|
||||
if (aProg->GetTextureCount() > 0) {
|
||||
aProg->SetTextureRects(aTextureRects);
|
||||
|
|
Загрузка…
Ссылка в новой задаче