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 @@
# elif defined(ANGLE_USE_X11)
# include "libANGLE/renderer/gl/glx/DisplayGLX.h"
# elif defined(ANGLE_PLATFORM_APPLE)
# include "libANGLE/renderer/gl/nsgl/DisplayNSGL.h"
# include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
# else
# error Unsupported OpenGL platform.
# endif
......@@ -115,7 +115,7 @@ rx::DisplayImpl *CreateDisplayImpl(const AttributeMap &attribMap)
#elif defined(ANGLE_USE_X11)
impl = new rx::DisplayGLX();
#elif defined(ANGLE_PLATFORM_APPLE)
impl = new rx::DisplayNSGL();
impl = new rx::DisplayCGL();
#else
// No display available
UNREACHABLE();
......@@ -139,7 +139,7 @@ rx::DisplayImpl *CreateDisplayImpl(const AttributeMap &attribMap)
#elif defined(ANGLE_USE_X11)
impl = new rx::DisplayGLX();
#elif defined(ANGLE_PLATFORM_APPLE)
impl = new rx::DisplayNSGL();
impl = new rx::DisplayCGL();
#else
#error Unsupported OpenGL platform.
#endif
......
......@@ -4,21 +4,21 @@
// 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_
#define LIBANGLE_RENDERER_GL_NSGL_DISPLAYNSGL_H_
#ifndef LIBANGLE_RENDERER_GL_CGL_DISPLAYCGL_H_
#define LIBANGLE_RENDERER_GL_CGL_DISPLAYCGL_H_
#include "libANGLE/renderer/gl/DisplayGL.h"
namespace rx
{
class DisplayNSGL : public DisplayGL
class DisplayCGL : public DisplayGL
{
public:
DisplayNSGL();
~DisplayNSGL() override;
DisplayCGL();
~DisplayCGL() override;
egl::Error initialize(egl::Display *display) override;
void terminate() override;
......@@ -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 @@
// 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 "libANGLE/renderer/gl/nsgl/WindowSurfaceNSGL.h"
#include "libANGLE/renderer/gl/CGL/WindowSurfaceCGL.h"
namespace rx
{
DisplayNSGL::DisplayNSGL()
DisplayCGL::DisplayCGL()
: DisplayGL(),
mEGLDisplay(nullptr)
{
}
DisplayNSGL::~DisplayNSGL()
DisplayCGL::~DisplayCGL()
{
}
egl::Error DisplayNSGL::initialize(egl::Display *display)
egl::Error DisplayCGL::initialize(egl::Display *display)
{
UNIMPLEMENTED();
mEGLDisplay = display;
return DisplayGL::initialize(display);
}
void DisplayNSGL::terminate()
void DisplayCGL::terminate()
{
UNIMPLEMENTED();
DisplayGL::terminate();
}
SurfaceImpl *DisplayNSGL::createWindowSurface(const egl::Config *configuration,
SurfaceImpl *DisplayCGL::createWindowSurface(const egl::Config *configuration,
EGLNativeWindowType window,
const egl::AttributeMap &attribs)
{
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)
{
UNIMPLEMENTED();
return nullptr;
}
SurfaceImpl* DisplayNSGL::createPbufferFromClientBuffer(const egl::Config *configuration,
SurfaceImpl* DisplayCGL::createPbufferFromClientBuffer(const egl::Config *configuration,
EGLClientBuffer shareHandle,
const egl::AttributeMap &attribs)
{
......@@ -60,7 +60,7 @@ SurfaceImpl* DisplayNSGL::createPbufferFromClientBuffer(const egl::Config *confi
return nullptr;
}
SurfaceImpl *DisplayNSGL::createPixmapSurface(const egl::Config *configuration,
SurfaceImpl *DisplayCGL::createPixmapSurface(const egl::Config *configuration,
NativePixmapType nativePixmap,
const egl::AttributeMap &attribs)
{
......@@ -68,61 +68,61 @@ SurfaceImpl *DisplayNSGL::createPixmapSurface(const egl::Config *configuration,
return nullptr;
}
egl::Error DisplayNSGL::getDevice(DeviceImpl **device)
egl::Error DisplayCGL::getDevice(DeviceImpl **device)
{
UNIMPLEMENTED();
return egl::Error(EGL_BAD_DISPLAY);
}
egl::ConfigSet DisplayNSGL::generateConfigs() const
egl::ConfigSet DisplayCGL::generateConfigs() const
{
UNIMPLEMENTED();
egl::ConfigSet configs;
return configs;
}
bool DisplayNSGL::isDeviceLost() const
bool DisplayCGL::isDeviceLost() const
{
UNIMPLEMENTED();
return false;
}
bool DisplayNSGL::testDeviceLost()
bool DisplayCGL::testDeviceLost()
{
UNIMPLEMENTED();
return false;
}
egl::Error DisplayNSGL::restoreLostDevice()
egl::Error DisplayCGL::restoreLostDevice()
{
UNIMPLEMENTED();
return egl::Error(EGL_BAD_DISPLAY);
}
bool DisplayNSGL::isValidNativeWindow(EGLNativeWindowType window) const
bool DisplayCGL::isValidNativeWindow(EGLNativeWindowType window) const
{
UNIMPLEMENTED();
return true;
}
std::string DisplayNSGL::getVendorString() const
std::string DisplayCGL::getVendorString() const
{
UNIMPLEMENTED();
return "";
}
const FunctionsGL *DisplayNSGL::getFunctionsGL() const
const FunctionsGL *DisplayCGL::getFunctionsGL() const
{
UNIMPLEMENTED();
return nullptr;
}
void DisplayNSGL::generateExtensions(egl::DisplayExtensions *outExtensions) const
void DisplayCGL::generateExtensions(egl::DisplayExtensions *outExtensions) const
{
UNIMPLEMENTED();
}
void DisplayNSGL::generateCaps(egl::Caps *outCaps) const
void DisplayCGL::generateCaps(egl::Caps *outCaps) const
{
UNIMPLEMENTED();
}
......
......@@ -4,21 +4,21 @@
// 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_
#define LIBANGLE_RENDERER_GL_NSGL_WINDOWSURFACENSGL_H_
#ifndef LIBANGLE_RENDERER_GL_CGL_WINDOWSURFACECGL_H_
#define LIBANGLE_RENDERER_GL_CGL_WINDOWSURFACECGL_H_
#include "libANGLE/renderer/gl/SurfaceGL.h"
namespace rx
{
class WindowSurfaceNSGL : public SurfaceGL
class WindowSurfaceCGL : public SurfaceGL
{
public:
WindowSurfaceNSGL();
~WindowSurfaceNSGL() override;
WindowSurfaceCGL();
~WindowSurfaceCGL() override;
egl::Error initialize() override;
egl::Error makeCurrent() override;
......@@ -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 @@
// 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"
namespace rx
{
WindowSurfaceNSGL::WindowSurfaceNSGL()
WindowSurfaceCGL::WindowSurfaceCGL()
: SurfaceGL()
{
}
WindowSurfaceNSGL::~WindowSurfaceNSGL()
WindowSurfaceCGL::~WindowSurfaceCGL()
{
}
egl::Error WindowSurfaceNSGL::initialize()
egl::Error WindowSurfaceCGL::initialize()
{
UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS);
}
egl::Error WindowSurfaceNSGL::makeCurrent()
egl::Error WindowSurfaceCGL::makeCurrent()
{
UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS);
}
egl::Error WindowSurfaceNSGL::swap()
egl::Error WindowSurfaceCGL::swap()
{
UNIMPLEMENTED();
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();
return egl::Error(EGL_SUCCESS);
}
egl::Error WindowSurfaceNSGL::querySurfacePointerANGLE(EGLint attribute, void **value)
egl::Error WindowSurfaceCGL::querySurfacePointerANGLE(EGLint attribute, void **value)
{
UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS);
}
egl::Error WindowSurfaceNSGL::bindTexImage(EGLint buffer)
egl::Error WindowSurfaceCGL::bindTexImage(EGLint buffer)
{
UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS);
}
egl::Error WindowSurfaceNSGL::releaseTexImage(EGLint buffer)
egl::Error WindowSurfaceCGL::releaseTexImage(EGLint buffer)
{
UNIMPLEMENTED();
return egl::Error(EGL_SUCCESS);
}
void WindowSurfaceNSGL::setSwapInterval(EGLint interval)
void WindowSurfaceCGL::setSwapInterval(EGLint interval)
{
UNIMPLEMENTED();
}
EGLint WindowSurfaceNSGL::getWidth() const
EGLint WindowSurfaceCGL::getWidth() const
{
UNIMPLEMENTED();
return 0;
}
EGLint WindowSurfaceNSGL::getHeight() const
EGLint WindowSurfaceCGL::getHeight() const
{
UNIMPLEMENTED();
return 0;
}
EGLint WindowSurfaceNSGL::isPostSubBufferSupported() const
EGLint WindowSurfaceCGL::isPostSubBufferSupported() const
{
UNIMPLEMENTED();
return EGL_FALSE;
......
......@@ -454,12 +454,12 @@
'libANGLE/renderer/gl/glx/functionsglx_typedefs.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/nsgl/DisplayNSGL.h',
'libANGLE/renderer/gl/nsgl/WindowSurfaceNSGL.mm',
'libANGLE/renderer/gl/nsgl/WindowSurfaceNSGL.h',
'libANGLE/renderer/gl/cgl/DisplayCGL.mm',
'libANGLE/renderer/gl/cgl/DisplayCGL.h',
'libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm',
'libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h',
],
'libglesv2_sources':
[
......@@ -710,7 +710,7 @@
{
'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