Backed out changeset beba1a053f5e
authorChris Jones <jones.chris.g@gmail.com>
Tue, 12 Jun 2012 21:40:40 -0700
changeset 96550 e3d9bee60f0e3cac4544d152eb6c446a325b0682
parent 96549 beba1a053f5e66077fab002f3901fbeed15d095d
child 96551 5cb4218ef40a6d1e1b859046fcdfb56a377111cd
push id22911
push useremorley@mozilla.com
push dateWed, 13 Jun 2012 12:49:30 +0000
treeherdermozilla-central@efbb6480e98e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone16.0a1
backs outbeba1a053f5e66077fab002f3901fbeed15d095d
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset beba1a053f5e
b2g/app/b2g.js
gfx/gl/GLContextProviderEGL.cpp
gfx/gl/GLDefs.h
gfx/gl/GLLibraryEGL.cpp
gfx/gl/GLLibraryEGL.h
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -488,11 +488,8 @@ pref("device.storage.enabled", true);
 
 pref("media.plugins.enabled", true);
 
 // Disable printing (particularly, window.print())
 pref("dom.disable_window_print", true);
 
 // Disable window.showModalDialog
 pref("dom.disable_window_showModalDialog", true);
-
-// Turns on gralloc-based direct texturing for Gonk
-pref("gfx.gralloc.enabled", false);
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -28,30 +28,17 @@
 #include "gfxXlibSurface.h"
 #endif
 
 #if defined(ANDROID)
 /* from widget */
 #if defined(MOZ_WIDGET_ANDROID)
 #include "AndroidBridge.h"
 #endif
-#include "cutils/properties.h"
 #include <android/log.h>
-#define LOG(args...)  __android_log_print(ANDROID_LOG_INFO, "Gonk" , ## args)
-
-# if defined(MOZ_WIDGET_GONK)
-#  include <ui/GraphicBuffer.h>
-
-using namespace android;
-
-# define EGL_NATIVE_BUFFER_ANDROID 0x3140
-# define EGL_IMAGE_PRESERVED_KHR   0x30D2
-
-# endif
-
 #endif
 
 #define GLES2_LIB "libGLESv2.so"
 #define GLES2_LIB2 "libGLESv2.so.2"
 
 #elif defined(XP_WIN)
 
 #include "nsIFile.h"
@@ -115,17 +102,17 @@ public:
 #include "GLLibraryEGL.h"
 #include "nsDebug.h"
 #include "nsThreadUtils.h"
 
 #include "nsIWidget.h"
 
 #include "gfxCrashReporterUtils.h"
 
-#if defined(MOZ_PLATFORM_MAEMO) || defined(MOZ_WIDGET_GONK)
+#ifdef MOZ_PLATFORM_MAEMO
 static bool gUseBackingSurface = true;
 #else
 static bool gUseBackingSurface = false;
 #endif
 
 #ifdef MOZ_WIDGET_GONK
 extern nsIntRect gScreenBounds;
 #endif
@@ -299,24 +286,16 @@ public:
 #if defined(XP_UNIX)
                 if (!OpenLibrary(GLES2_LIB2)) {
                     NS_WARNING("Couldn't load GLES2 LIB.");
                     return false;
                 }
 #endif
             }
 
-#ifdef MOZ_WIDGET_GONK
-        gUseBackingSurface = Preferences::GetBool("gfx.gralloc.enabled", false);
-        char propValue[PROPERTY_VALUE_MAX];
-        property_get("ro.build.version.sdk", propValue, "0");
-        if (atoi(propValue) < 15)
-            gUseBackingSurface = false;
-#endif
-
         bool current = MakeCurrent();
         if (!current) {
             gfx::LogFailure(NS_LITERAL_CSTRING(
                 "Couldn't get device attachments for device."));
             return false;
         }
 
         bool ok = InitWithPrefix("gl", true);
@@ -761,34 +740,16 @@ GLFormatForImage(gfxASurface::gfxImageFo
     case gfxASurface::ImageFormatRGB16_565:
         return LOCAL_GL_RGB;
     default:
         NS_WARNING("Unknown GL format for Image format");
     }
     return 0;
 }
 
-#ifdef MOZ_WIDGET_GONK
-static PixelFormat
-PixelFormatForImage(gfxASurface::gfxImageFormat aFormat)
-{
-    switch (aFormat) {
-    case gfxASurface::ImageFormatARGB32:
-        return PIXEL_FORMAT_RGBA_8888;
-    case gfxASurface::ImageFormatRGB24:
-        return PIXEL_FORMAT_RGBX_8888;
-    case gfxASurface::ImageFormatRGB16_565:
-        return PIXEL_FORMAT_RGB_565;
-    default:
-        MOZ_NOT_REACHED("Unknown gralloc pixel format for Image format");
-    }
-    return 0;
-}
-#endif
-
 static GLenum
 GLTypeForImage(gfxASurface::gfxImageFormat aFormat)
 {
     switch (aFormat) {
     case gfxASurface::ImageFormatARGB32:
     case gfxASurface::ImageFormatRGB24:
         return LOCAL_GL_UNSIGNED_BYTE;
     case gfxASurface::ImageFormatRGB16_565:
@@ -818,39 +779,21 @@ public:
         , mEGLImage(nsnull)
         , mTextureState(Created)
         , mBound(false)
         , mIsLocked(false)
     {
         mUpdateFormat = gfxPlatform::GetPlatform()->OptimalFormatForContent(GetContentType());
 
         if (gUseBackingSurface) {
-#ifdef MOZ_WIDGET_GONK
-            mGLContext->fGenTextures(1, &mBackTexture);
-            switch (mUpdateFormat) {
-            case gfxASurface::ImageFormatARGB32:
-                mShaderType = BGRALayerProgramType;
-                break;
-            case gfxASurface::ImageFormatRGB24:
-                mUpdateFormat = gfxASurface::ImageFormatARGB32;
-                mShaderType = BGRXLayerProgramType;
-                break;
-            case gfxASurface::ImageFormatRGB16_565:
-                mShaderType = RGBXLayerProgramType;
-                break;
-            default:
-                MOZ_NOT_REACHED("Unknown update format");
-            }
-#else
             if (mUpdateFormat != gfxASurface::ImageFormatARGB32) {
                 mShaderType = RGBXLayerProgramType;
             } else {
                 mShaderType = RGBALayerProgramType;
             }
-#endif
             Resize(aSize);
         } else {
             if (mUpdateFormat == gfxASurface::ImageFormatRGB16_565) {
                 mShaderType = RGBXLayerProgramType;
             } else if (mUpdateFormat == gfxASurface::ImageFormatRGB24) {
                 // RGB24 means really RGBX for Thebes, which means we have to
                 // use the right shader and ignore the uninitialized alpha
                 // value.
@@ -870,72 +813,50 @@ public:
 
         // If we have a context, then we need to delete the texture;
         // if we don't have a context (either real or shared),
         // then they went away when the contex was deleted, because it
         // was the only one that had access to it.
         if (ctx && !ctx->IsDestroyed()) {
             ctx->MakeCurrent();
             ctx->fDeleteTextures(1, &mTexture);
-            ctx->fDeleteTextures(1, &mBackTexture);
             ReleaseTexImage();
             DestroyEGLSurface();
         }
     }
 
-    bool UsingDirectTexture()
-    {
-#ifdef MOZ_WIDGET_GONK
-        if (mGraphicBuffer != nsnull)
-            return true;
-#endif
-        return !!mBackingSurface;
-    }
-
     virtual void GetUpdateRegion(nsIntRegion& aForRegion)
     {
         if (mTextureState != Valid) {
             // if the texture hasn't been initialized yet, force the
             // client to paint everything
             aForRegion = nsIntRect(nsIntPoint(0, 0), mSize);
-        }
-
-        if (UsingDirectTexture()) {
-            return;
+        } else if (!mBackingSurface) {
+            // We can only draw a rectangle, not subregions due to
+            // the way that our texture upload functions work.  If
+            // needed, we /could/ do multiple texture uploads if we have
+            // non-overlapping rects, but that's a tradeoff.
+            aForRegion = nsIntRegion(aForRegion.GetBounds());
         }
-
-        // We can only draw a rectangle, not subregions due to
-        // the way that our texture upload functions work.  If
-        // needed, we /could/ do multiple texture uploads if we have
-        // non-overlapping rects, but that's a tradeoff.
-        aForRegion = nsIntRegion(aForRegion.GetBounds());
     }
 
     virtual gfxASurface* BeginUpdate(nsIntRegion& aRegion)
     {
         NS_ASSERTION(!mUpdateSurface, "BeginUpdate() without EndUpdate()?");
 
         // determine the region the client will need to repaint
         GetUpdateRegion(aRegion);
         mUpdateRect = aRegion.GetBounds();
 
         //printf_stderr("BeginUpdate with updateRect [%d %d %d %d]\n", mUpdateRect.x, mUpdateRect.y, mUpdateRect.width, mUpdateRect.height);
         if (!nsIntRect(nsIntPoint(0, 0), mSize).Contains(mUpdateRect)) {
             NS_ERROR("update outside of image");
             return NULL;
         }
 
-#ifdef MOZ_WIDGET_GONK
-        if (mGraphicBuffer != nsnull) {
-            mUpdateSurface = GetLockSurface();
-
-            return mUpdateSurface;
-        }
-#endif
-
         if (mBackingSurface) {
             if (sEGLLibrary.HasKHRLockSurface()) {
                 mUpdateSurface = GetLockSurface();
             } else {
                 mUpdateSurface = mBackingSurface;
             }
 
             return mUpdateSurface;
@@ -1041,21 +962,17 @@ public:
         nsIntRegion region;
         if (mTextureState != Valid) {
             bounds = nsIntRect(0, 0, mSize.width, mSize.height);
             region = nsIntRegion(bounds);
         } else {
             region = aRegion;
         }
 
-        if ((mBackingSurface && sEGLLibrary.HasKHRLockSurface())
-#ifdef MOZ_WIDGET_GONK
-            || (mGraphicBuffer != nsnull)
-#endif
-            ) {
+        if (mBackingSurface && sEGLLibrary.HasKHRLockSurface()) {
             mUpdateSurface = GetLockSurface();
             if (mUpdateSurface) {
                 nsRefPtr<gfxContext> ctx = new gfxContext(mUpdateSurface);
                 gfxUtils::ClipToRegion(ctx, aRegion);
                 ctx->SetSource(aSurf, gfxPoint(-aFrom.x, -aFrom.y));
                 ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
                 ctx->Paint();
                 mUpdateSurface = nsnull;
@@ -1101,23 +1018,23 @@ public:
     virtual void Resize(const nsIntSize& aSize)
     {
         NS_ASSERTION(!mUpdateSurface, "Resize() while in update?");
 
         if (mSize == aSize && mTextureState != Created)
             return;
 
         mGLContext->fBindTexture(LOCAL_GL_TEXTURE_2D, mTexture);
-    
+	
         // Try to generate a backin surface first if we have the ability
         if (gUseBackingSurface) {
             CreateBackingSurface(gfxIntSize(aSize.width, aSize.height));
         }
 
-        if (!UsingDirectTexture()) {
+        if (!mBackingSurface) {
             // If we don't have a backing surface or failed to obtain one,
             // use the GL Texture failsafe
             mGLContext->fTexImage2D(LOCAL_GL_TEXTURE_2D,
                                     0,
                                     GLFormatForImage(mUpdateFormat),
                                     aSize.width,
                                     aSize.height,
                                     0,
@@ -1166,47 +1083,16 @@ public:
 
     virtual already_AddRefed<gfxImageSurface> GetLockSurface()
     {
         if (mIsLocked) {
             NS_WARNING("Can't lock surface twice");
             return nsnull;
         }
 
-#ifdef MOZ_WIDGET_GONK
-        if (mGraphicBuffer != nsnull) {
-            mGLContext->MakeCurrent(true);
-            mGLContext->fActiveTexture(LOCAL_GL_TEXTURE0);
-            mGLContext->fBindTexture(LOCAL_GL_TEXTURE_2D, mTexture);
-            sEGLLibrary.fImageTargetTexture2DOES(LOCAL_GL_TEXTURE_2D, mEGLImage);
-            if (sEGLLibrary.fGetError() != LOCAL_EGL_SUCCESS) {
-                LOG("Could not set image target texture. ERROR (0x%04x)", sEGLLibrary.fGetError());
-                return false;
-            }
-
-            void *vaddr;
-            if (mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN |
-                                     GraphicBuffer::USAGE_SW_WRITE_OFTEN,
-                                     &vaddr) != OK) {
-                LOG("Could not lock GraphicBuffer");
-                return false;
-            }
-
-            nsRefPtr<gfxImageSurface> surface =
-                new gfxImageSurface(reinterpret_cast<unsigned char *>(vaddr),
-                                    gfxIntSize(mSize.width, mSize.height),
-                                    mGraphicBuffer->getStride() * gfxUtils::ImageFormatToDepth(mUpdateFormat) / 8,
-                                    mUpdateFormat);
-
-            mIsLocked = true;
-
-            return surface.forget();
-        }
-#endif
-
         if (!sEGLLibrary.HasKHRLockSurface()) {
             NS_WARNING("GetLockSurface called, but no EGL_KHR_lock_surface extension!");
             return nsnull;
         }
 
         if (!CreateEGLSurface(mBackingSurface)) {
             NS_WARNING("Failed to create EGL surface");
             return nsnull;
@@ -1241,27 +1127,18 @@ public:
 
     virtual void UnlockSurface()
     {
         if (!mIsLocked) {
             NS_WARNING("UnlockSurface called, surface not locked!");
             return;
         }
 
+        sEGLLibrary.fUnlockSurface(EGL_DISPLAY(), mSurface);
         mIsLocked = false;
-
-#ifdef MOZ_WIDGET_GONK
-        if (mGraphicBuffer != nsnull) {
-            mGraphicBuffer->unlock();
-
-            return;
-        }
-#endif
-
-        sEGLLibrary.fUnlockSurface(EGL_DISPLAY(), mSurface);
     }
 
     virtual already_AddRefed<gfxASurface> GetBackingSurface()
     {
         nsRefPtr<gfxASurface> copy = mBackingSurface;
         return copy.forget();
     }
 
@@ -1293,27 +1170,16 @@ public:
         return true;
 #else
         return false;
 #endif
     }
 
     virtual void DestroyEGLSurface(void)
     {
-#ifdef MOZ_WIDGET_GONK
-        mGraphicBuffer.clear();
-        mGraphicBackBuffer.clear();
-
-        if (mEGLImage) {
-            sEGLLibrary.fDestroyImage(EGL_DISPLAY(), mEGLImage);
-            sEGLLibrary.fDestroyImage(EGL_DISPLAY(), mBackEGLImage);
-            mEGLImage = mBackEGLImage = nsnull;
-        }
-#endif
-
         if (!mSurface)
             return;
 
         sEGLLibrary.fDestroySurface(EGL_DISPLAY(), mSurface);
         mSurface = nsnull;
     }
 
     virtual bool CreateBackingSurface(const gfxIntSize& aSize)
@@ -1359,77 +1225,34 @@ public:
 
             if (!BindTexImage()) {
                 printf_stderr("ProviderEGL Failed to bind teximage: ERROR (0x%04x)\n", sEGLLibrary.fGetError());
                 return false;
             }
         }
 
         mBackingSurface = xsurface;
-
-        return mBackingSurface != nsnull;
 #endif
 
-#ifdef MOZ_WIDGET_GONK
-        if (gUseBackingSurface) {
-            mGLContext->MakeCurrent(true);
-            PixelFormat format = PixelFormatForImage(mUpdateFormat);
-            uint32_t usage = GraphicBuffer::USAGE_HW_TEXTURE |
-                             GraphicBuffer::USAGE_SW_READ_OFTEN |
-                             GraphicBuffer::USAGE_SW_WRITE_OFTEN;
-            mGraphicBuffer = new GraphicBuffer(aSize.width, aSize.height, format, usage);
-            mGraphicBackBuffer = new GraphicBuffer(aSize.width, aSize.height, format, usage);
-            if (mGraphicBuffer->initCheck() == OK && mGraphicBackBuffer->initCheck() == OK) {
-                const int eglImageAttributes[] = { EGL_IMAGE_PRESERVED_KHR, LOCAL_EGL_TRUE,
-                                                   LOCAL_EGL_NONE, LOCAL_EGL_NONE };
-                mEGLImage = sEGLLibrary.fCreateImage(EGL_DISPLAY(),
-                                                        EGL_NO_CONTEXT,
-                                                        EGL_NATIVE_BUFFER_ANDROID,
-                                                        (EGLClientBuffer) mGraphicBuffer->getNativeBuffer(),
-                                                        eglImageAttributes);
-                mBackEGLImage = sEGLLibrary.fCreateImage(EGL_DISPLAY(),
-                                                        EGL_NO_CONTEXT,
-                                                        EGL_NATIVE_BUFFER_ANDROID,
-                                                        (EGLClientBuffer) mGraphicBackBuffer->getNativeBuffer(),
-                                                        eglImageAttributes);
-                if (!mEGLImage || !mBackEGLImage) {
-                    LOG("Could not create EGL images: ERROR (0x%04x)", sEGLLibrary.fGetError());
-                    return false;
-                }
-
-                return true;
-            }
-
-            LOG("GraphicBufferAllocator::alloc failed");
-            return false;
-        }
-#endif
         return mBackingSurface != nsnull;
     }
 
 protected:
     typedef gfxASurface::gfxImageFormat ImageFormat;
 
     GLContext* mGLContext;
 
     nsIntRect mUpdateRect;
     ImageFormat mUpdateFormat;
-    bool mUsingDirectTexture;
     nsRefPtr<gfxASurface> mBackingSurface;
     nsRefPtr<gfxASurface> mUpdateSurface;
-#ifdef MOZ_WIDGET_GONK
-    sp<GraphicBuffer> mGraphicBuffer, mGraphicBackBuffer;
-    EGLImage mEGLImage, mBackEGLImage;
-    GLuint mTexture, mBackTexture;
-#else
-    EGLImage mEGLImage;
-    GLuint mTexture;
-#endif
     EGLSurface mSurface;
     EGLConfig mConfig;
+    GLuint mTexture;
+    EGLImage mEGLImage;
     TextureState mTextureState;
 
     bool mBound;
     bool mIsLocked;
 
     virtual void ApplyFilter()
     {
         mGLContext->ApplyFilterToBoundTexture(mFilter);
@@ -1645,19 +1468,16 @@ GLContextProviderEGL::CreateForWindow(ns
                              NULL,
                              sEGLLibrary.fGetCurrentSurface(LOCAL_EGL_DRAW), // just use same surface for read and draw
                              currentContext,
                              false);
 
         if (!glContext->Init())
             return nsnull;
 
-        glContext->MakeCurrent();
-        sEGLLibrary.LoadConfigSensitiveSymbols();
-
         glContext->SetIsDoubleBuffered(doubleBuffered);
 
         glContext->SetPlatformContext(platformContext);
         if (!gGlobalContext) {
             gGlobalContext = glContext;
         }
 
         return glContext.forget();
@@ -1692,18 +1512,16 @@ GLContextProviderEGL::CreateForWindow(ns
                                       config,
                                       shareContext,
                                       false);
 
     if (!glContext) {
         return nsnull;
     }
 
-    glContext->MakeCurrent();
-    sEGLLibrary.LoadConfigSensitiveSymbols();
     glContext->SetIsDoubleBuffered(doubleBuffered);
 
     return glContext.forget();
 }
 
 static void
 FillPBufferAttribs_Minimal(nsTArray<EGLint>& aAttrs)
 {
--- a/gfx/gl/GLDefs.h
+++ b/gfx/gl/GLDefs.h
@@ -3260,11 +3260,10 @@ typedef void* GLeglImage;
 #define LOCAL_EGL_SYNC_CONDITION              0x30F8
 #define LOCAL_EGL_SIGNALED                    0x30F2
 #define LOCAL_EGL_UNSIGNALED                  0x30F3
 #define LOCAL_EGL_SYNC_PRIOR_COMMANDS_COMPLETE  0x30F0
 #define LOCAL_EGL_SYNC_FLUSH_COMMANDS_BIT     0x0001
 #define LOCAL_EGL_FOREVER                     0xFFFFFFFFFFFFFFFFull
 #define LOCAL_EGL_TIMEOUT_EXPIRED             0x30F5
 #define LOCAL_EGL_CONDITION_SATISFIED         0x30F6
-#define LOCAL_EGL_SUCCESS                     0x3000
 
 #endif
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -177,16 +177,40 @@ GLLibraryEGL::EnsureInitialized()
         mIsANGLE = true;
     }
     
     InitExtensions();
 
     GLLibraryLoader::PlatformLookupFunction lookupFunction =
             (GLLibraryLoader::PlatformLookupFunction)mSymbols.fGetProcAddress;
 
+    if (IsExtensionSupported(KHR_image) || IsExtensionSupported(KHR_image_base)) {
+        GLLibraryLoader::SymLoadStruct imageSymbols[] = {
+            { (PRFuncPtr*) &mSymbols.fCreateImage,  { "eglCreateImageKHR",  nsnull } },
+            { (PRFuncPtr*) &mSymbols.fDestroyImage, { "eglDestroyImageKHR", nsnull } },
+            { nsnull, { nsnull } }
+        };
+
+        bool success = GLLibraryLoader::LoadSymbols(mEGLLibrary,
+                                                    &imageSymbols[0],
+                                                    lookupFunction);
+        if (!success) {
+            NS_ERROR("EGL supports KHR_image(_base) without exposing its functions!");
+
+            MarkExtensionUnsupported(KHR_image);
+            MarkExtensionUnsupported(KHR_image_base);
+            MarkExtensionUnsupported(KHR_image_pixmap);
+
+            mSymbols.fCreateImage = nsnull;
+            mSymbols.fDestroyImage = nsnull;
+        }
+    } else {
+        MarkExtensionUnsupported(KHR_image_pixmap);
+    }
+
     if (IsExtensionSupported(KHR_lock_surface)) {
         GLLibraryLoader::SymLoadStruct lockSymbols[] = {
             { (PRFuncPtr*) &mSymbols.fLockSurface,   { "eglLockSurfaceKHR",   nsnull } },
             { (PRFuncPtr*) &mSymbols.fUnlockSurface, { "eglUnlockSurfaceKHR", nsnull } },
             { nsnull, { nsnull } }
         };
 
         bool success = GLLibraryLoader::LoadSymbols(mEGLLibrary,
@@ -275,49 +299,16 @@ GLLibraryEGL::InitExtensions()
     mAvailableExtensions.Load(extensions, sExtensionNames, firstVerboseRun);
 
 #ifdef DEBUG
     firstVerboseRun = false;
 #endif
 }
 
 void
-GLLibraryEGL::LoadConfigSensitiveSymbols()
-{
-    GLLibraryLoader::PlatformLookupFunction lookupFunction =
-            (GLLibraryLoader::PlatformLookupFunction)mSymbols.fGetProcAddress;
-
-    if (IsExtensionSupported(KHR_image) || IsExtensionSupported(KHR_image_base)) {
-        GLLibraryLoader::SymLoadStruct imageSymbols[] = {
-            { (PRFuncPtr*) &mSymbols.fCreateImage,  { "eglCreateImageKHR",  nsnull } },
-            { (PRFuncPtr*) &mSymbols.fDestroyImage, { "eglDestroyImageKHR", nsnull } },
-            { (PRFuncPtr*) &mSymbols.fImageTargetTexture2DOES, { "glEGLImageTargetTexture2DOES", NULL } },
-            { nsnull, { nsnull } }
-        };
-
-        bool success = GLLibraryLoader::LoadSymbols(mEGLLibrary,
-                                                    &imageSymbols[0],
-                                                    lookupFunction);
-        if (!success) {
-            NS_ERROR("EGL supports KHR_image(_base) without exposing its functions!");
-
-            MarkExtensionUnsupported(KHR_image);
-            MarkExtensionUnsupported(KHR_image_base);
-            MarkExtensionUnsupported(KHR_image_pixmap);
-
-            mSymbols.fCreateImage = nsnull;
-            mSymbols.fDestroyImage = nsnull;
-            mSymbols.fImageTargetTexture2DOES = nsnull;
-        }
-    } else {
-        MarkExtensionUnsupported(KHR_image_pixmap);
-    }
-}
-
-void
 GLLibraryEGL::DumpEGLConfig(EGLConfig cfg)
 {
     int attrval;
     int err;
 
 #define ATTR(_x) do {                                                   \
         fGetConfigAttrib(mEGLDisplay, cfg, LOCAL_EGL_##_x, &attrval);  \
         if ((err = fGetError()) != 0x3000) {                        \
--- a/gfx/gl/GLLibraryEGL.h
+++ b/gfx/gl/GLLibraryEGL.h
@@ -416,24 +416,16 @@ public:
     EGLBoolean fGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value)
     {
         BEFORE_GL_CALL;
         EGLBoolean b = mSymbols.fGetSyncAttrib(dpy, sync, attribute, value);
         AFTER_GL_CALL;
         return b;
     }
 
-    void fImageTargetTexture2DOES(GLenum target, EGLImage image)
-    {
-        BEFORE_GL_CALL;
-        mSymbols.fImageTargetTexture2DOES(target, image);
-        AFTER_GL_CALL;
-    }
-
-
     EGLDisplay Display() {
         return mEGLDisplay;
     }
 
     bool IsANGLE() {
         return mIsANGLE;
     }
 
@@ -457,17 +449,16 @@ public:
         return IsExtensionSupported(ANGLE_surface_d3d_texture_2d_share_handle);
     }
 
     bool HasRobustness() {
         return IsExtensionSupported(EXT_create_context_robustness);
     }
 
     bool EnsureInitialized();
-    void LoadConfigSensitiveSymbols();
 
     void DumpEGLConfig(EGLConfig cfg);
     void DumpEGLConfigs();
 
     struct {
         typedef EGLDisplay (GLAPIENTRY * pfnGetDisplay)(void *display_id);
         pfnGetDisplay fGetDisplay;
         typedef EGLSurface (GLAPIENTRY * pfnGetCurrentSurface)(EGLint);
@@ -537,21 +528,16 @@ public:
         typedef EGLSync (GLAPIENTRY * pfnCreateSync)(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
         pfnCreateSync fCreateSync;
         typedef EGLBoolean (GLAPIENTRY * pfnDestroySync)(EGLDisplay dpy, EGLSync sync);
         pfnDestroySync fDestroySync;
         typedef EGLint (GLAPIENTRY * pfnClientWaitSync)(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
         pfnClientWaitSync fClientWaitSync;
         typedef EGLBoolean (GLAPIENTRY * pfnGetSyncAttrib)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value);
         pfnGetSyncAttrib fGetSyncAttrib;
-
-        // This is EGL specific GL ext symbol "glEGLImageTargetTexture2DOES"
-        // Lets keep it here for now.
-        typedef void (GLAPIENTRY * pfnImageTargetTexture2DOES)(GLenum target, EGLImage image);
-        pfnImageTargetTexture2DOES fImageTargetTexture2DOES;
     } mSymbols;
 
 private:
     bool mInitialized;
     PRLibrary* mEGLLibrary;
     EGLDisplay mEGLDisplay;
 
     bool mIsANGLE;