From b5ca635c39d90632b29f42977b8f07fc1fd37070 Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Wed, 6 Jul 2016 15:20:52 -0700 Subject: [PATCH] Bug 1285044 - Remove unused NV_fence from ShSurfANGLE. - r=mtseng MozReview-Commit-ID: LhYzgGdOVEq --- gfx/gl/SharedSurfaceANGLE.cpp | 19 ++----------------- gfx/gl/SharedSurfaceANGLE.h | 4 +--- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/gfx/gl/SharedSurfaceANGLE.cpp b/gfx/gl/SharedSurfaceANGLE.cpp index 7066df562c87..30a6de0b6ff4 100644 --- a/gfx/gl/SharedSurfaceANGLE.cpp +++ b/gfx/gl/SharedSurfaceANGLE.cpp @@ -72,15 +72,9 @@ SharedSurface_ANGLEShareHandle::Create(GLContext* gl, EGLConfig config, &opaqueKeyedMutex); RefPtr keyedMutex = static_cast(opaqueKeyedMutex); - GLuint fence = 0; - if (gl->IsExtensionSupported(GLContext::NV_fence)) { - gl->MakeCurrent(); - gl->fGenFences(1, &fence); - } - typedef SharedSurface_ANGLEShareHandle ptrT; UniquePtr ret( new ptrT(gl, egl, size, hasAlpha, pbuffer, shareHandle, - keyedMutex, fence) ); + keyedMutex) ); return Move(ret); } @@ -96,8 +90,7 @@ SharedSurface_ANGLEShareHandle::SharedSurface_ANGLEShareHandle(GLContext* gl, bool hasAlpha, EGLSurface pbuffer, HANDLE shareHandle, - const RefPtr& keyedMutex, - GLuint fence) + const RefPtr& keyedMutex) : SharedSurface(SharedSurfaceType::EGLSurfaceANGLE, AttachmentType::Screen, gl, @@ -108,7 +101,6 @@ SharedSurface_ANGLEShareHandle::SharedSurface_ANGLEShareHandle(GLContext* gl, , mPBuffer(pbuffer) , mShareHandle(shareHandle) , mKeyedMutex(keyedMutex) - , mFence(fence) { } @@ -116,13 +108,6 @@ SharedSurface_ANGLEShareHandle::SharedSurface_ANGLEShareHandle(GLContext* gl, SharedSurface_ANGLEShareHandle::~SharedSurface_ANGLEShareHandle() { mEGL->fDestroySurface(Display(), mPBuffer); - - if (!mGL->MakeCurrent()) - return; - - if (mFence) { - mGL->fDeleteFences(1, &mFence); - } } void diff --git a/gfx/gl/SharedSurfaceANGLE.h b/gfx/gl/SharedSurfaceANGLE.h index b0d03fee7388..58844db7b443 100644 --- a/gfx/gl/SharedSurfaceANGLE.h +++ b/gfx/gl/SharedSurfaceANGLE.h @@ -40,7 +40,6 @@ public: const HANDLE mShareHandle; protected: RefPtr mKeyedMutex; - const GLuint mFence; SharedSurface_ANGLEShareHandle(GLContext* gl, GLLibraryEGL* egl, @@ -48,8 +47,7 @@ protected: bool hasAlpha, EGLSurface pbuffer, HANDLE shareHandle, - const RefPtr& keyedMutex, - GLuint fence); + const RefPtr& keyedMutex); EGLDisplay Display();