Bug 1053635 - Expose SharedSurfaceEGL::mImage. r=romaxa
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 14 Aug 2014 15:07:00 -0400
changeset 199999 aba347b49c326ea19f94a7cec40ac5505daf4daa
parent 199998 e653346a04636ff4e767808a5abfa933577f427e
child 200000 4d72b6b1bfcdba9ad141db2b2e71362e099a4a9c
push id9784
push userryanvm@gmail.com
push dateSat, 16 Aug 2014 21:45:40 +0000
treeherderb2g-inbound@94ba78a42305 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersromaxa
bugs1053635
milestone34.0a1
Bug 1053635 - Expose SharedSurfaceEGL::mImage. r=romaxa
gfx/gl/SharedSurfaceEGL.cpp
gfx/gl/SharedSurfaceEGL.h
--- a/gfx/gl/SharedSurfaceEGL.cpp
+++ b/gfx/gl/SharedSurfaceEGL.cpp
@@ -81,17 +81,16 @@ SharedSurface_EGLImage::SharedSurface_EG
     , mCurConsGL(nullptr)
     , mConsTex(0)
     , mSync(0)
 {}
 
 SharedSurface_EGLImage::~SharedSurface_EGLImage()
 {
     mEGL->fDestroyImage(Display(), mImage);
-    mImage = 0;
 
     mGL->MakeCurrent();
     mGL->fDeleteTextures(1, &mProdTex);
     mProdTex = 0;
 
     if (mConsTex) {
         MOZ_ASSERT(mGarbageBin);
         mGarbageBin->Trash(mConsTex);
--- a/gfx/gl/SharedSurfaceEGL.h
+++ b/gfx/gl/SharedSurfaceEGL.h
@@ -36,17 +36,19 @@ public:
 
     static bool HasExtensions(GLLibraryEGL* egl, GLContext* gl);
 
 protected:
     mutable Mutex mMutex;
     GLLibraryEGL* const mEGL;
     const GLFormats mFormats;
     GLuint mProdTex;
-    EGLImage mImage;
+public:
+    const EGLImage mImage;
+protected:
     GLContext* mCurConsGL;
     GLuint mConsTex;
     nsRefPtr<TextureGarbageBin> mGarbageBin;
     EGLSync mSync;
 
     SharedSurface_EGLImage(GLContext* gl,
                            GLLibraryEGL* egl,
                            const gfx::IntSize& size,