Commit ea1be878 by Corentin Wallez

Change the NSGL skeleton to be a CGL skeleton

The previous skeleton was name NSGL because it seemed the easier route to go, however Chrome uses CGL internally, which we want to match. BUG=angleproject:891 Change-Id: I00eb597080c8b735545750dfcd6ad80dcea79300 Reviewed-on: https://chromium-review.googlesource.com/289870Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 9988a028
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
# elif defined(ANGLE_USE_X11) # elif defined(ANGLE_USE_X11)
# include "libANGLE/renderer/gl/glx/DisplayGLX.h" # include "libANGLE/renderer/gl/glx/DisplayGLX.h"
# elif defined(ANGLE_PLATFORM_APPLE) # elif defined(ANGLE_PLATFORM_APPLE)
# include "libANGLE/renderer/gl/nsgl/DisplayNSGL.h" # include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
# else # else
# error Unsupported OpenGL platform. # error Unsupported OpenGL platform.
# endif # endif
...@@ -115,7 +115,7 @@ rx::DisplayImpl *CreateDisplayImpl(const AttributeMap &attribMap) ...@@ -115,7 +115,7 @@ rx::DisplayImpl *CreateDisplayImpl(const AttributeMap &attribMap)
#elif defined(ANGLE_USE_X11) #elif defined(ANGLE_USE_X11)
impl = new rx::DisplayGLX(); impl = new rx::DisplayGLX();
#elif defined(ANGLE_PLATFORM_APPLE) #elif defined(ANGLE_PLATFORM_APPLE)
impl = new rx::DisplayNSGL(); impl = new rx::DisplayCGL();
#else #else
// No display available // No display available
UNREACHABLE(); UNREACHABLE();
...@@ -139,7 +139,7 @@ rx::DisplayImpl *CreateDisplayImpl(const AttributeMap &attribMap) ...@@ -139,7 +139,7 @@ rx::DisplayImpl *CreateDisplayImpl(const AttributeMap &attribMap)
#elif defined(ANGLE_USE_X11) #elif defined(ANGLE_USE_X11)
impl = new rx::DisplayGLX(); impl = new rx::DisplayGLX();
#elif defined(ANGLE_PLATFORM_APPLE) #elif defined(ANGLE_PLATFORM_APPLE)
impl = new rx::DisplayNSGL(); impl = new rx::DisplayCGL();
#else #else
#error Unsupported OpenGL platform. #error Unsupported OpenGL platform.
#endif #endif
......
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// DisplayNSGL.h: NSOpenGL implementation of egl::Display // DisplayCGL.h: CGL implementation of egl::Display
#ifndef LIBANGLE_RENDERER_GL_NSGL_DISPLAYNSGL_H_ #ifndef LIBANGLE_RENDERER_GL_CGL_DISPLAYCGL_H_
#define LIBANGLE_RENDERER_GL_NSGL_DISPLAYNSGL_H_ #define LIBANGLE_RENDERER_GL_CGL_DISPLAYCGL_H_
#include "libANGLE/renderer/gl/DisplayGL.h" #include "libANGLE/renderer/gl/DisplayGL.h"
namespace rx namespace rx
{ {
class DisplayNSGL : public DisplayGL class DisplayCGL : public DisplayGL
{ {
public: public:
DisplayNSGL(); DisplayCGL();
~DisplayNSGL() override; ~DisplayCGL() override;
egl::Error initialize(egl::Display *display) override; egl::Error initialize(egl::Display *display) override;
void terminate() override; void terminate() override;
...@@ -58,4 +58,4 @@ class DisplayNSGL : public DisplayGL ...@@ -58,4 +58,4 @@ class DisplayNSGL : public DisplayGL
} }
#endif // LIBANGLE_RENDERER_GL_NSGL_DISPLAYNSGL_H_ #endif // LIBANGLE_RENDERER_GL_CGL_DISPLAYCGL_H_
...@@ -4,55 +4,55 @@ ...@@ -4,55 +4,55 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// DisplayNSGL.mm: NSOpenGL implementation of egl::Display // DisplayCGL.mm: CGL implementation of egl::Display
#include "libANGLE/renderer/gl/nsgl/DisplayNSGL.h" #include "libANGLE/renderer/gl/CGL/DisplayCGL.h"
#include "common/debug.h" #include "common/debug.h"
#include "libANGLE/renderer/gl/nsgl/WindowSurfaceNSGL.h" #include "libANGLE/renderer/gl/CGL/WindowSurfaceCGL.h"
namespace rx namespace rx
{ {
DisplayNSGL::DisplayNSGL() DisplayCGL::DisplayCGL()
: DisplayGL(), : DisplayGL(),
mEGLDisplay(nullptr) mEGLDisplay(nullptr)
{ {
} }
DisplayNSGL::~DisplayNSGL() DisplayCGL::~DisplayCGL()
{ {
} }
egl::Error DisplayNSGL::initialize(egl::Display *display) egl::Error DisplayCGL::initialize(egl::Display *display)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
mEGLDisplay = display; mEGLDisplay = display;
return DisplayGL::initialize(display); return DisplayGL::initialize(display);
} }
void DisplayNSGL::terminate() void DisplayCGL::terminate()
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
DisplayGL::terminate(); DisplayGL::terminate();
} }
SurfaceImpl *DisplayNSGL::createWindowSurface(const egl::Config *configuration, SurfaceImpl *DisplayCGL::createWindowSurface(const egl::Config *configuration,
EGLNativeWindowType window, EGLNativeWindowType window,
const egl::AttributeMap &attribs) const egl::AttributeMap &attribs)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return new WindowSurfaceNSGL(); return new WindowSurfaceCGL();
} }
SurfaceImpl *DisplayNSGL::createPbufferSurface(const egl::Config *configuration, SurfaceImpl *DisplayCGL::createPbufferSurface(const egl::Config *configuration,
const egl::AttributeMap &attribs) const egl::AttributeMap &attribs)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return nullptr; return nullptr;
} }
SurfaceImpl* DisplayNSGL::createPbufferFromClientBuffer(const egl::Config *configuration, SurfaceImpl* DisplayCGL::createPbufferFromClientBuffer(const egl::Config *configuration,
EGLClientBuffer shareHandle, EGLClientBuffer shareHandle,
const egl::AttributeMap &attribs) const egl::AttributeMap &attribs)
{ {
...@@ -60,7 +60,7 @@ SurfaceImpl* DisplayNSGL::createPbufferFromClientBuffer(const egl::Config *confi ...@@ -60,7 +60,7 @@ SurfaceImpl* DisplayNSGL::createPbufferFromClientBuffer(const egl::Config *confi
return nullptr; return nullptr;
} }
SurfaceImpl *DisplayNSGL::createPixmapSurface(const egl::Config *configuration, SurfaceImpl *DisplayCGL::createPixmapSurface(const egl::Config *configuration,
NativePixmapType nativePixmap, NativePixmapType nativePixmap,
const egl::AttributeMap &attribs) const egl::AttributeMap &attribs)
{ {
...@@ -68,61 +68,61 @@ SurfaceImpl *DisplayNSGL::createPixmapSurface(const egl::Config *configuration, ...@@ -68,61 +68,61 @@ SurfaceImpl *DisplayNSGL::createPixmapSurface(const egl::Config *configuration,
return nullptr; return nullptr;
} }
egl::Error DisplayNSGL::getDevice(DeviceImpl **device) egl::Error DisplayCGL::getDevice(DeviceImpl **device)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_BAD_DISPLAY); return egl::Error(EGL_BAD_DISPLAY);
} }
egl::ConfigSet DisplayNSGL::generateConfigs() const egl::ConfigSet DisplayCGL::generateConfigs() const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
egl::ConfigSet configs; egl::ConfigSet configs;
return configs; return configs;
} }
bool DisplayNSGL::isDeviceLost() const bool DisplayCGL::isDeviceLost() const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return false; return false;
} }
bool DisplayNSGL::testDeviceLost() bool DisplayCGL::testDeviceLost()
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return false; return false;
} }
egl::Error DisplayNSGL::restoreLostDevice() egl::Error DisplayCGL::restoreLostDevice()
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_BAD_DISPLAY); return egl::Error(EGL_BAD_DISPLAY);
} }
bool DisplayNSGL::isValidNativeWindow(EGLNativeWindowType window) const bool DisplayCGL::isValidNativeWindow(EGLNativeWindowType window) const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return true; return true;
} }
std::string DisplayNSGL::getVendorString() const std::string DisplayCGL::getVendorString() const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return ""; return "";
} }
const FunctionsGL *DisplayNSGL::getFunctionsGL() const const FunctionsGL *DisplayCGL::getFunctionsGL() const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return nullptr; return nullptr;
} }
void DisplayNSGL::generateExtensions(egl::DisplayExtensions *outExtensions) const void DisplayCGL::generateExtensions(egl::DisplayExtensions *outExtensions) const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void DisplayNSGL::generateCaps(egl::Caps *outCaps) const void DisplayCGL::generateCaps(egl::Caps *outCaps) const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
......
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// WindowSurfaceNSGL.h: NSOpenGL implementation of egl::Surface for windows // WindowSurfaceCGL.h: CGL implementation of egl::Surface for windows
#ifndef LIBANGLE_RENDERER_GL_NSGL_WINDOWSURFACENSGL_H_ #ifndef LIBANGLE_RENDERER_GL_CGL_WINDOWSURFACECGL_H_
#define LIBANGLE_RENDERER_GL_NSGL_WINDOWSURFACENSGL_H_ #define LIBANGLE_RENDERER_GL_CGL_WINDOWSURFACECGL_H_
#include "libANGLE/renderer/gl/SurfaceGL.h" #include "libANGLE/renderer/gl/SurfaceGL.h"
namespace rx namespace rx
{ {
class WindowSurfaceNSGL : public SurfaceGL class WindowSurfaceCGL : public SurfaceGL
{ {
public: public:
WindowSurfaceNSGL(); WindowSurfaceCGL();
~WindowSurfaceNSGL() override; ~WindowSurfaceCGL() override;
egl::Error initialize() override; egl::Error initialize() override;
egl::Error makeCurrent() override; egl::Error makeCurrent() override;
...@@ -38,4 +38,4 @@ class WindowSurfaceNSGL : public SurfaceGL ...@@ -38,4 +38,4 @@ class WindowSurfaceNSGL : public SurfaceGL
} }
#endif // LIBANGLE_RENDERER_GL_NSGL_WINDOWSURFACENSGL_H_ #endif // LIBANGLE_RENDERER_GL_CGL_WINDOWSURFACECGL_H_
...@@ -4,84 +4,84 @@ ...@@ -4,84 +4,84 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// WindowSurfaceNSGL.cpp: NSGL implementation of egl::Surface for windows // WindowSurfaceCGL.cpp: CGL implementation of egl::Surface for windows
#include "libANGLE/renderer/gl/nsgl/WindowSurfaceNSGL.h" #include "libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h"
#include "common/debug.h" #include "common/debug.h"
namespace rx namespace rx
{ {
WindowSurfaceNSGL::WindowSurfaceNSGL() WindowSurfaceCGL::WindowSurfaceCGL()
: SurfaceGL() : SurfaceGL()
{ {
} }
WindowSurfaceNSGL::~WindowSurfaceNSGL() WindowSurfaceCGL::~WindowSurfaceCGL()
{ {
} }
egl::Error WindowSurfaceNSGL::initialize() egl::Error WindowSurfaceCGL::initialize()
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
egl::Error WindowSurfaceNSGL::makeCurrent() egl::Error WindowSurfaceCGL::makeCurrent()
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
egl::Error WindowSurfaceNSGL::swap() egl::Error WindowSurfaceCGL::swap()
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
egl::Error WindowSurfaceNSGL::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) egl::Error WindowSurfaceCGL::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
egl::Error WindowSurfaceNSGL::querySurfacePointerANGLE(EGLint attribute, void **value) egl::Error WindowSurfaceCGL::querySurfacePointerANGLE(EGLint attribute, void **value)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
egl::Error WindowSurfaceNSGL::bindTexImage(EGLint buffer) egl::Error WindowSurfaceCGL::bindTexImage(EGLint buffer)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
egl::Error WindowSurfaceNSGL::releaseTexImage(EGLint buffer) egl::Error WindowSurfaceCGL::releaseTexImage(EGLint buffer)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
void WindowSurfaceNSGL::setSwapInterval(EGLint interval) void WindowSurfaceCGL::setSwapInterval(EGLint interval)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
EGLint WindowSurfaceNSGL::getWidth() const EGLint WindowSurfaceCGL::getWidth() const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return 0; return 0;
} }
EGLint WindowSurfaceNSGL::getHeight() const EGLint WindowSurfaceCGL::getHeight() const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return 0; return 0;
} }
EGLint WindowSurfaceNSGL::isPostSubBufferSupported() const EGLint WindowSurfaceCGL::isPostSubBufferSupported() const
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return EGL_FALSE; return EGL_FALSE;
......
...@@ -454,12 +454,12 @@ ...@@ -454,12 +454,12 @@
'libANGLE/renderer/gl/glx/functionsglx_typedefs.h', 'libANGLE/renderer/gl/glx/functionsglx_typedefs.h',
'libANGLE/renderer/gl/glx/platform_glx.h', 'libANGLE/renderer/gl/glx/platform_glx.h',
], ],
'libangle_gl_nsgl_sources': 'libangle_gl_cgl_sources':
[ [
'libANGLE/renderer/gl/nsgl/DisplayNSGL.mm', 'libANGLE/renderer/gl/cgl/DisplayCGL.mm',
'libANGLE/renderer/gl/nsgl/DisplayNSGL.h', 'libANGLE/renderer/gl/cgl/DisplayCGL.h',
'libANGLE/renderer/gl/nsgl/WindowSurfaceNSGL.mm', 'libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm',
'libANGLE/renderer/gl/nsgl/WindowSurfaceNSGL.h', 'libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h',
], ],
'libglesv2_sources': 'libglesv2_sources':
[ [
...@@ -710,7 +710,7 @@ ...@@ -710,7 +710,7 @@
{ {
'sources': 'sources':
[ [
'<@(libangle_gl_nsgl_sources)', '<@(libangle_gl_cgl_sources)',
], ],
}], }],
], ],
......
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