Bug 1357299 - P1: Fix the wrong ext string for QueryDisplayAttribEXT. v2. r=jgilbert
authorJerryShih <hshih@mozilla.com>
Mon, 07 Aug 2017 18:15:21 +0800
changeset 414809 d3a09c2c2a465ce08486d56cdf682884c34efeee
parent 414808 974bd1c1c1f6aa85178a13311fe88389f3a9187a
child 414810 5d97c974cc64971567dc9dd9c3576f42e533e320
push id71
push userfmarier@mozilla.com
push dateTue, 08 Aug 2017 23:59:24 +0000
reviewersjgilbert
bugs1357299
milestone57.0a1
Bug 1357299 - P1: Fix the wrong ext string for QueryDisplayAttribEXT. v2. r=jgilbert MozReview-Commit-ID: 3lZG2GrxXHF
gfx/gl/GLLibraryEGL.cpp
gfx/gl/GLLibraryEGL.h
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -52,17 +52,16 @@ static const char* sEGLExtensionNames[] 
     "EGL_ANDROID_native_fence_sync",
     "EGL_ANDROID_image_crop",
     "EGL_ANGLE_platform_angle",
     "EGL_ANGLE_platform_angle_d3d",
     "EGL_ANGLE_d3d_share_handle_client_buffer",
     "EGL_KHR_create_context",
     "EGL_KHR_stream",
     "EGL_KHR_stream_consumer_gltexture",
-    "EGL_EXT_device_base",
     "EGL_EXT_device_query",
     "EGL_NV_stream_consumer_gltexture_yuv",
     "EGL_ANGLE_stream_producer_d3d_texture_nv12",
 };
 
 #if defined(ANDROID)
 
 static PRLibrary* LoadApitraceLibrary()
@@ -622,29 +621,19 @@ GLLibraryEGL::EnsureInitialized(bool for
             END_OF_SYMBOLS
         };
         if (!fnLoadSymbols(streamConsumerSymbols)) {
             NS_ERROR("EGL supports KHR_stream_consumer_gltexture without exposing its functions!");
             MarkExtensionUnsupported(KHR_stream_consumer_gltexture);
         }
     }
 
-    if (IsExtensionSupported(EXT_device_base)) {
-        const GLLibraryLoader::SymLoadStruct deviceBaseSymbols[] = {
-            SYMBOL(QueryDisplayAttribEXT),
-            END_OF_SYMBOLS
-        };
-        if (!fnLoadSymbols(deviceBaseSymbols)) {
-            NS_ERROR("EGL supports EXT_device_base without exposing its functions!");
-            MarkExtensionUnsupported(EXT_device_base);
-        }
-    }
-
     if (IsExtensionSupported(EXT_device_query)) {
         const GLLibraryLoader::SymLoadStruct queryDisplaySymbols[] = {
+            SYMBOL(QueryDisplayAttribEXT),
             SYMBOL(QueryDeviceAttribEXT),
             END_OF_SYMBOLS
         };
         if (!fnLoadSymbols(queryDisplaySymbols)) {
             NS_ERROR("EGL supports EXT_device_query without exposing its functions!");
             MarkExtensionUnsupported(EXT_device_query);
         }
     }
--- a/gfx/gl/GLLibraryEGL.h
+++ b/gfx/gl/GLLibraryEGL.h
@@ -103,17 +103,16 @@ public:
         ANDROID_native_fence_sync,
         EGL_ANDROID_image_crop,
         ANGLE_platform_angle,
         ANGLE_platform_angle_d3d,
         ANGLE_d3d_share_handle_client_buffer,
         KHR_create_context,
         KHR_stream,
         KHR_stream_consumer_gltexture,
-        EXT_device_base,
         EXT_device_query,
         NV_stream_consumer_gltexture_yuv,
         ANGLE_stream_producer_d3d_texture_nv12,
         Extensions_Max
     };
 
     bool IsExtensionSupported(EGLExtensions aKnownExtension) const {
         return mAvailableExtensions[aKnownExtension];
@@ -300,21 +299,20 @@ public:
 
     // KHR_stream_consumer_gltexture
     EGLBoolean  fStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) const
         WRAP(   fStreamConsumerAcquireKHR(dpy, stream) )
 
     EGLBoolean  fStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) const
         WRAP(   fStreamConsumerReleaseKHR(dpy, stream) )
 
-    // EXT_device_base
+    // EXT_device_query
     EGLBoolean  fQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib* value) const
         WRAP(   fQueryDisplayAttribEXT(dpy, attribute, value) )
 
-    // EXT_device_query
     EGLBoolean  fQueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribute, EGLAttrib* value) const
         WRAP(   fQueryDeviceAttribEXT(device, attribute, value) )
 
     // NV_stream_consumer_gltexture_yuv
     EGLBoolean  fStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) const
         WRAP(   fStreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list) )
 
     // ANGLE_stream_producer_d3d_texture_nv12
@@ -459,21 +457,20 @@ private:
                                                   EGLStreamKHR stream,
                                                   EGLenum attribute,
                                                   EGLint* value);
         // KHR_stream_consumer_gltexture
         EGLBoolean (GLAPIENTRY * fStreamConsumerAcquireKHR)(EGLDisplay dpy,
                                                             EGLStreamKHR stream);
         EGLBoolean (GLAPIENTRY * fStreamConsumerReleaseKHR)(EGLDisplay dpy,
                                                             EGLStreamKHR stream);
-        // EXT_device_base
+        // EXT_device_query
         EGLBoolean (GLAPIENTRY * fQueryDisplayAttribEXT)(EGLDisplay dpy,
                                                          EGLint attribute,
                                                          EGLAttrib* value);
-        // EXT_device_query
         EGLBoolean (GLAPIENTRY * fQueryDeviceAttribEXT)(EGLDeviceEXT device,
                                                         EGLint attribute,
                                                         EGLAttrib* value);
         // NV_stream_consumer_gltexture_yuv
         EGLBoolean (GLAPIENTRY * fStreamConsumerGLTextureExternalAttribsNV)(EGLDisplay dpy,
                                                                             EGLStreamKHR stream,
                                                                             const EGLAttrib* attrib_list);
         // ANGLE_stream_producer_d3d_texture_nv12