[EFL] [WebGL] Rename EGLConfigHelper as EGLConfigSelector.

https://bugs.webkit.org/show_bug.cgi?id=105876

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2012-12-30
Reviewed by Kenneth Rohde Christiansen.

This is to sync the naming conventions of our classes in both EGL and GLX implementations.
In our GLX implementation, class responsible for the same functionality is named as GLXConfigSelector.
This patch renames EGLConfigHelper as EGLConfigSelector.

.:

* Source/cmake/OptionsEfl.cmake:

Source/WebCore:

* PlatformEfl.cmake:
* platform/graphics/surfaces/egl/EGLConfigSelector.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/egl/EGLConfigHelper.cpp.
(WebCore):
(WebCore::SharedEGLDisplay::deref):
(WebCore::SharedEGLDisplay::sharedEGLDisplay):
(WebCore::SharedEGLDisplay::SharedEGLDisplay):
(WebCore::SharedEGLDisplay::cleanup):
(WebCore::SharedEGLDisplay::~SharedEGLDisplay):
(WebCore::EGLConfigSelector::EGLConfigSelector):
(WebCore::EGLConfigSelector::~EGLConfigSelector):
(WebCore::EGLConfigSelector::display):
(WebCore::EGLConfigSelector::pBufferContextConfig):
(WebCore::EGLConfigSelector::surfaceContextConfig):
(WebCore::EGLConfigSelector::nativeVisualId):
(WebCore::EGLConfigSelector::reset):
(WebCore::EGLConfigSelector::createConfig):
* platform/graphics/surfaces/egl/EGLConfigSelector.h: Renamed from Source/WebCore/platform/graphics/surfaces/egl/EGLConfigHelper.h.
(WebCore):
(SharedEGLDisplay):
(WebCore::SharedEGLDisplay::create):
(EGLConfigSelector):
* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
(WebCore::EGLWindowTransportSurface::configuration):
(WebCore::EGLWindowTransportSurface::destroy):
* platform/graphics/surfaces/egl/EGLSurface.h:
(EGLWindowTransportSurface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6a3eb73c
2012-12-30 Kondapally Kalyan <kalyan.kondapally@intel.com>
[EFL] [WebGL] Rename EGLConfigHelper as EGLConfigSelector.
https://bugs.webkit.org/show_bug.cgi?id=105876
Reviewed by Kenneth Rohde Christiansen.
This is to sync the naming conventions of our classes in both EGL and GLX implementations.
In our GLX implementation, class responsible for the same functionality is named as GLXConfigSelector.
This patch renames EGLConfigHelper as EGLConfigSelector.
* Source/cmake/OptionsEfl.cmake:
2012-12-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Enable TEMPLATE_ELEMENT feature
......
2012-12-30 Kondapally Kalyan <kalyan.kondapally@intel.com>
[EFL] [WebGL] Rename EGLConfigHelper as EGLConfigSelector.
https://bugs.webkit.org/show_bug.cgi?id=105876
Reviewed by Kenneth Rohde Christiansen.
This is to sync the naming conventions of our classes in both EGL and GLX implementations.
In our GLX implementation, class responsible for the same functionality is named as GLXConfigSelector.
This patch renames EGLConfigHelper as EGLConfigSelector.
* PlatformEfl.cmake:
* platform/graphics/surfaces/egl/EGLConfigSelector.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/egl/EGLConfigHelper.cpp.
(WebCore):
(WebCore::SharedEGLDisplay::deref):
(WebCore::SharedEGLDisplay::sharedEGLDisplay):
(WebCore::SharedEGLDisplay::SharedEGLDisplay):
(WebCore::SharedEGLDisplay::cleanup):
(WebCore::SharedEGLDisplay::~SharedEGLDisplay):
(WebCore::EGLConfigSelector::EGLConfigSelector):
(WebCore::EGLConfigSelector::~EGLConfigSelector):
(WebCore::EGLConfigSelector::display):
(WebCore::EGLConfigSelector::pBufferContextConfig):
(WebCore::EGLConfigSelector::surfaceContextConfig):
(WebCore::EGLConfigSelector::nativeVisualId):
(WebCore::EGLConfigSelector::reset):
(WebCore::EGLConfigSelector::createConfig):
* platform/graphics/surfaces/egl/EGLConfigSelector.h: Renamed from Source/WebCore/platform/graphics/surfaces/egl/EGLConfigHelper.h.
(WebCore):
(SharedEGLDisplay):
(WebCore::SharedEGLDisplay::create):
(EGLConfigSelector):
* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
(WebCore::EGLWindowTransportSurface::configuration):
(WebCore::EGLWindowTransportSurface::destroy):
* platform/graphics/surfaces/egl/EGLSurface.h:
(EGLWindowTransportSurface):
2012-12-30 Philippe Normand <pnormand@igalia.com>
[GStreamer] webaudio/decode-audio-data-basic.html fails
......@@ -293,8 +293,9 @@ if (WTF_USE_3D_GRAPHICS)
if (WTF_USE_EGL)
list(APPEND WebCore_SOURCES
platform/graphics/surfaces/egl/EGLSurface.cpp
platform/graphics/surfaces/egl/EGLConfigSelector.cpp
platform/graphics/surfaces/egl/EGLContext.cpp
platform/graphics/surfaces/egl/EGLSurface.cpp
)
endif ()
......
......@@ -24,7 +24,7 @@
*/
#include "config.h"
#include "EGLConfigHelper.h"
#include "EGLConfigSelector.h"
#if USE(EGL)
......@@ -55,7 +55,7 @@ void SharedEGLDisplay::deref()
}
}
EGLDisplay SharedEGLDisplay::sharedEGLDisplay()
EGLDisplay SharedEGLDisplay::sharedEGLDisplay() const
{
return m_eglDisplay;
}
......@@ -104,23 +104,23 @@ SharedEGLDisplay::~SharedEGLDisplay()
cleanup();
}
EGLConfigHelper::EGLConfigHelper(NativeSharedDisplay* display)
EGLConfigSelector::EGLConfigSelector(NativeSharedDisplay* display)
: m_pbufferFBConfig(0)
, m_surfaceContextFBConfig(0)
{
m_sharedDisplay = SharedEGLDisplay::create(display);
}
EGLConfigHelper::~EGLConfigHelper()
EGLConfigSelector::~EGLConfigSelector()
{
}
PlatformDisplay EGLConfigHelper::display()
PlatformDisplay EGLConfigSelector::display() const
{
return m_sharedDisplay->sharedEGLDisplay();
}
EGLConfig EGLConfigHelper::pBufferContextConfig()
EGLConfig EGLConfigSelector::pBufferContextConfig()
{
if (!m_pbufferFBConfig) {
configAttributeList[13] = EGL_PIXMAP_BIT;
......@@ -130,7 +130,7 @@ EGLConfig EGLConfigHelper::pBufferContextConfig()
return m_pbufferFBConfig;
}
EGLConfig EGLConfigHelper::surfaceContextConfig()
EGLConfig EGLConfigSelector::surfaceContextConfig()
{
if (!m_surfaceContextFBConfig) {
configAttributeList[13] = EGL_WINDOW_BIT;
......@@ -140,7 +140,7 @@ EGLConfig EGLConfigHelper::surfaceContextConfig()
return m_surfaceContextFBConfig;
}
EGLint EGLConfigHelper::nativeVisualId(const EGLConfig& config)
EGLint EGLConfigSelector::nativeVisualId(const EGLConfig& config) const
{
if (display() == EGL_NO_DISPLAY)
return -1;
......@@ -151,13 +151,13 @@ EGLint EGLConfigHelper::nativeVisualId(const EGLConfig& config)
return eglValue;
}
void EGLConfigHelper::reset()
void EGLConfigSelector::reset()
{
m_surfaceContextFBConfig = 0;
m_pbufferFBConfig = 0;
}
EGLConfig EGLConfigHelper::createConfig(const int attributes[])
EGLConfig EGLConfigSelector::createConfig(const int attributes[])
{
if (display() == EGL_NO_DISPLAY)
return 0;
......
......@@ -23,8 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef EGLConfigHelper_h
#define EGLConfigHelper_h
#ifndef EGLConfigSelector_h
#define EGLConfigSelector_h
#if USE(EGL)
......@@ -53,7 +53,7 @@ public:
}
void deref();
EGLDisplay sharedEGLDisplay();
EGLDisplay sharedEGLDisplay() const;
protected:
SharedEGLDisplay(NativeSharedDisplay*);
......@@ -64,16 +64,16 @@ protected:
EGLDisplay m_eglDisplay;
};
class EGLConfigHelper {
WTF_MAKE_NONCOPYABLE(EGLConfigHelper);
class EGLConfigSelector {
WTF_MAKE_NONCOPYABLE(EGLConfigSelector);
public:
EGLConfigHelper(NativeSharedDisplay* = 0);
virtual ~EGLConfigHelper();
PlatformDisplay display();
EGLConfigSelector(NativeSharedDisplay* = 0);
virtual ~EGLConfigSelector();
PlatformDisplay display() const;
virtual EGLConfig pBufferContextConfig();
virtual EGLConfig surfaceContextConfig();
EGLint nativeVisualId(const EGLConfig&);
EGLint nativeVisualId(const EGLConfig&) const;
void reset();
private:
......
......@@ -34,23 +34,23 @@ EGLWindowTransportSurface::EGLWindowTransportSurface()
: GLPlatformSurface()
{
m_nativeResource = adoptPtr(new NativeOffScreenWindow());
m_eglConfigHelper = adoptPtr(new EGLConfigHelper(m_nativeResource->nativeSharedDisplay()));
m_sharedDisplay = m_eglConfigHelper->display();
m_configSelector = adoptPtr(new EGLConfigSelector(m_nativeResource->nativeSharedDisplay()));
m_sharedDisplay = m_configSelector->display();
if (m_sharedDisplay == EGL_NO_DISPLAY) {
m_eglConfigHelper = nullptr;
m_configSelector = nullptr;
m_nativeResource = nullptr;
return;
}
EGLConfig config = m_eglConfigHelper->surfaceContextConfig();
EGLConfig config = m_configSelector->surfaceContextConfig();
if (!config) {
destroy();
return;
}
EGLint visualId = m_eglConfigHelper->nativeVisualId(config);
EGLint visualId = m_configSelector->nativeVisualId(config);
if (visualId == -1) {
destroy();
......@@ -69,7 +69,7 @@ EGLWindowTransportSurface::EGLWindowTransportSurface()
return;
}
m_drawable = eglCreateWindowSurface(m_sharedDisplay, m_eglConfigHelper->surfaceContextConfig(), (EGLNativeWindowType)m_bufferHandle, 0);
m_drawable = eglCreateWindowSurface(m_sharedDisplay, m_configSelector->surfaceContextConfig(), (EGLNativeWindowType)m_bufferHandle, 0);
if (m_drawable == EGL_NO_SURFACE) {
LOG_ERROR("Failed to create EGL surface(%d).", eglGetError());
......@@ -83,7 +83,7 @@ EGLWindowTransportSurface::~EGLWindowTransportSurface()
PlatformSurfaceConfig EGLWindowTransportSurface::configuration()
{
return m_eglConfigHelper->surfaceContextConfig();
return m_configSelector->surfaceContextConfig();
}
void EGLWindowTransportSurface::swapBuffers()
......@@ -111,7 +111,7 @@ void EGLWindowTransportSurface::destroy()
m_nativeResource->destroyWindow(m_bufferHandle);
freeEGLResources();
m_nativeResource = nullptr;
m_eglConfigHelper = nullptr;
m_configSelector = nullptr;
m_bufferHandle = 0;
}
......
......@@ -28,7 +28,7 @@
#if USE(EGL) && USE(GRAPHICS_SURFACE)
#include "EGLConfigHelper.h"
#include "EGLConfigSelector.h"
#include "GLPlatformSurface.h"
#include <glx/X11WindowResources.h>
......@@ -53,7 +53,7 @@ public:
private:
void freeEGLResources();
OwnPtr<NativeOffScreenWindow> m_nativeResource;
OwnPtr<EGLConfigHelper> m_eglConfigHelper;
OwnPtr<EGLConfigSelector> m_configSelector;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment