Bug 1322650 - Disable blitting from a SurfaceTexture r=jgilbert

This has been broken for a while anyway, because we
disabled SurfaceTexture detachment in most cases.

MozReview-Commit-ID: 6ysRGDNCQa0
This commit is contained in:
James Willcox 2017-03-03 15:22:10 -06:00
parent ad1995d388
commit 85b4c1a702

View File

@ -684,30 +684,8 @@ GLBlitHelper::BindAndUploadEGLImage(EGLImage image, GLuint target)
bool
GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage)
{
AndroidSurfaceTexture* surfaceTexture = stImage->GetSurfaceTexture();
ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0);
if (NS_FAILED(surfaceTexture->Attach(mGL, PR_MillisecondsToInterval(ATTACH_WAIT_MS))))
return false;
// UpdateTexImage() changes the EXTERNAL binding, so save it here
// so we can restore it after.
int oldBinding = 0;
mGL->fGetIntegerv(LOCAL_GL_TEXTURE_BINDING_EXTERNAL, &oldBinding);
surfaceTexture->UpdateTexImage();
gfx::Matrix4x4 transform;
surfaceTexture->GetTransformMatrix(transform);
mGL->fUniformMatrix4fv(mTextureTransformLoc, 1, false, &transform._11);
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
surfaceTexture->Detach();
mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL, oldBinding);
return true;
// FIXME
return false;
}
bool