Bug 959171 - Fix how to bind EGLImage in GrallocTextureHostOGL. r=nical

This commit is contained in:
Sotaro Ikeda
2014-01-21 11:49:38 -05:00
parent f1dad1e402
commit c94cbd17c3
2 changed files with 9 additions and 0 deletions

View File

@@ -122,6 +122,7 @@ void GrallocTextureSourceOGL::BindTexture(GLenum aTextureUnit)
gl()->fActiveTexture(aTextureUnit);
gl()->fBindTexture(textureTarget, tex);
gl()->fEGLImageTargetTexture2D(textureTarget, mEGLImage);
gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
}
@@ -173,6 +174,13 @@ GrallocTextureSourceOGL::SetCompositableBackendSpecificData(CompositableBackendS
}
if (!mNeedsReset) {
// Update binding to the EGLImage
gl()->MakeCurrent();
GLuint tex = GetGLTexture();
GLuint textureTarget = GetTextureTarget();
gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
gl()->fBindTexture(textureTarget, tex);
gl()->fEGLImageTargetTexture2D(textureTarget, mEGLImage);
return;
}