Bug 1322650 - Disable blitting from a SurfaceTexture r=jgilbert draft
authorJames Willcox <snorp@snorp.net>
Fri, 03 Mar 2017 15:22:10 -0600
changeset 568951 4aa73902dd654e87a86eb4f47c981fdc765969ee
parent 568950 e98cce97ad96cc38db05725645679071802c4391
child 568952 0802d4a6c34d764fd10ff4fa90af64cba04c8fa0
push id56033
push userbmo:snorp@snorp.net
push dateWed, 26 Apr 2017 20:29:44 +0000
reviewersjgilbert
bugs1322650
milestone55.0a1
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
gfx/gl/GLBlitHelper.cpp
--- a/gfx/gl/GLBlitHelper.cpp
+++ b/gfx/gl/GLBlitHelper.cpp
@@ -679,40 +679,18 @@ GLBlitHelper::BindAndUploadEGLImage(EGLI
 
 #ifdef MOZ_WIDGET_ANDROID
 
 #define ATTACH_WAIT_MS 50
 
 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
 GLBlitHelper::BlitEGLImageImage(layers::EGLImageImage* image)
 {
     EGLImage eglImage = image->GetImage();
     EGLSync eglSync = image->GetSync();