Make EGL extension function naming consistent with the spec.
authorMika Isojärvi <misojarvi@google.com>
Thu, 28 Jan 2016 18:20:34 +0000 (10:20 -0800)
committerMika Isojärvi <misojarvi@google.com>
Thu, 28 Jan 2016 18:22:07 +0000 (10:22 -0800)
Bug: 24172822
Change-Id: I17860369450a56641f846a661d3367d4e65b3740

framework/egl/egluUtil.cpp
framework/egl/egluUtil.hpp
modules/egl/teglCreateContextExtTests.cpp
modules/egl/teglCreateSurfaceTests.cpp
modules/egl/teglGLES2SharedRenderingPerfTests.cpp
modules/egl/teglGetProcAddressTests.cpp
modules/egl/teglImageFormatTests.cpp
modules/egl/teglInfoTests.cpp

index da126cc..a774f47 100644 (file)
@@ -83,12 +83,12 @@ bool hasExtension (const Library& egl, EGLDisplay display, const string& str)
        return de::contains(extensions.begin(), extensions.end(), str);
 }
 
-vector<string> getPlatformExtensions (const Library& egl)
+vector<string> getClientExtensions (const Library& egl)
 {
        return getExtensions(egl, EGL_NO_DISPLAY);
 }
 
-vector<string> getClientExtensions (const Library& egl, EGLDisplay display)
+vector<string> getDisplayExtensions (const Library& egl, EGLDisplay display)
 {
        DE_ASSERT(display != EGL_NO_DISPLAY);
 
@@ -236,7 +236,7 @@ EGLDisplay getDisplay (NativeDisplay& nativeDisplay)
 
        if (supportsPlatformGetDisplay)
        {
-               const vector<string> platformExts = getPlatformExtensions(egl);
+               const vector<string> platformExts = getClientExtensions(egl);
                usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) &&
                                                 de::contains(platformExts.begin(), platformExts.end(), string(nativeDisplay.getPlatformExtensionName()));
        }
@@ -289,7 +289,7 @@ EGLSurface createWindowSurface (NativeDisplay& nativeDisplay, NativeWindow& wind
 
        if (supportsPlatformCreate)
        {
-               const vector<string> platformExts = getPlatformExtensions(egl);
+               const vector<string> platformExts = getClientExtensions(egl);
                usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) &&
                                                 de::contains(platformExts.begin(), platformExts.end(), string(nativeDisplay.getPlatformExtensionName()));
        }
@@ -330,7 +330,7 @@ EGLSurface createPixmapSurface (NativeDisplay& nativeDisplay, NativePixmap& pixm
 
        if (supportsPlatformCreate)
        {
-               const vector<string> platformExts = getPlatformExtensions(egl);
+               const vector<string> platformExts = getClientExtensions(egl);
                usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) &&
                                                 de::contains(platformExts.begin(), platformExts.end(), string(nativeDisplay.getPlatformExtensionName()));
        }
index 8c5dd3d..1fe322a 100644 (file)
@@ -56,8 +56,8 @@ std::vector<eglw::EGLint>             attribMapToList                         (const AttribMap& map);
 
 Version                                                        getVersion                                      (const eglw::Library& egl, eglw::EGLDisplay display);
 
-std::vector<std::string>               getPlatformExtensions           (const eglw::Library& egl);
-std::vector<std::string>               getClientExtensions                     (const eglw::Library& egl, eglw::EGLDisplay display);
+std::vector<std::string>               getClientExtensions                     (const eglw::Library& egl);
+std::vector<std::string>               getDisplayExtensions            (const eglw::Library& egl, eglw::EGLDisplay display);
 bool                                                   hasExtension                            (const eglw::Library& egl, eglw::EGLDisplay display, const std::string& extName);
 
 std::vector<eglw::EGLConfig>   getConfigs                                      (const eglw::Library& egl, eglw::EGLDisplay display);
index 5253926..5153b41 100644 (file)
@@ -369,7 +369,7 @@ void CreateContextExtCase::checkRequiredExtensions (void)
 {
        bool                    isOk = true;
        set<string>             requiredExtensions;
-       vector<string>  extensions                      = eglu::getClientExtensions(m_eglTestCtx.getLibrary(), m_display);
+       vector<string>  extensions                      = eglu::getDisplayExtensions(m_eglTestCtx.getLibrary(), m_display);
 
        {
                const EGLint* iter = &(m_attribList[0]);
index 49c2381..712d06d 100644 (file)
@@ -56,7 +56,7 @@ namespace
 
 void checkEGLPlatformSupport (const Library& egl, const char* platformExt)
 {
-       std::vector<std::string> extensions = eglu::getPlatformExtensions(egl);
+       std::vector<std::string> extensions = eglu::getClientExtensions(egl);
 
        if (!de::contains(extensions.begin(), extensions.end(), platformExt))
                throw tcu::NotSupportedError((std::string("Platform extension '") + platformExt + "' not supported").c_str(), "", __FILE__, __LINE__);
index 5e2dcc9..d5e2312 100644 (file)
@@ -495,7 +495,7 @@ TestContext::TestContext (EglTestContext& testCtx, EGLDisplay eglDisplay, EGLCon
                || m_config.textureType == TestConfig::TEXTURETYPE_SHARED_IMAGE
                || m_config.textureType == TestConfig::TEXTURETYPE_SHARED_IMAGE_TEXTURE)
        {
-               const vector<string> extensions = eglu::getClientExtensions(egl, m_eglDisplay);
+               const vector<string> extensions = eglu::getDisplayExtensions(egl, m_eglDisplay);
 
                if (!de::contains(extensions.begin(), extensions.end(), "EGL_KHR_image_base") ||
                        !de::contains(extensions.begin(), extensions.end(), "EGL_KHR_gl_texture_2D_image"))
index 7fd18c9..5b065d1 100644 (file)
@@ -127,7 +127,7 @@ void GetProcAddressCase::init (void)
        DE_ASSERT(m_display == EGL_NO_DISPLAY);
 
        m_display       = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
-       m_supported     = eglu::getClientExtensions(m_eglTestCtx.getLibrary(), m_display);
+       m_supported     = eglu::getDisplayExtensions(m_eglTestCtx.getLibrary(), m_display);
 
        m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
 }
index e7cf0f4..2d46751 100644 (file)
@@ -923,7 +923,7 @@ void ImageFormatCase::checkExtensions (void)
        const EGLDisplay                dpy             = m_display;
        set<string>                             exts;
        const vector<string>    glExts  = de::splitString((const char*) m_gl.getString(GL_EXTENSIONS));
-       const vector<string>    eglExts = eglu::getClientExtensions(egl, dpy);
+       const vector<string>    eglExts = eglu::getDisplayExtensions(egl, dpy);
 
        exts.insert(glExts.begin(), glExts.end());
        exts.insert(eglExts.begin(), eglExts.end());
index 8ed6daf..44fd58e 100644 (file)
@@ -149,7 +149,7 @@ public:
        IterateResult iterate (void)
        {
                const Library&  egl                     = m_eglTestCtx.getLibrary();
-               vector<string>  extensions      = eglu::getClientExtensions(egl, m_display);
+               vector<string>  extensions      = eglu::getDisplayExtensions(egl, m_display);
 
                for (vector<string>::const_iterator i = extensions.begin(); i != extensions.end(); i++)
                        m_testCtx.getLog() << tcu::TestLog::Message << *i << tcu::TestLog::EndMessage;