diff options
author | bsalomon <bsalomon@google.com> | 2016-03-31 10:07:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-31 10:07:24 -0700 |
commit | 4c7f0a16312c374eba4e8d5d46435ce9eb0b9971 (patch) | |
tree | 8b5e597a2577667fba4aa1e9d4eb8ede2c545ffb /tools/gpu/gl | |
parent | 51a315eff9b86bd60e7884240c4efc199129d37a (diff) |
rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext
rename subclasses
Fix up the EGL native GLTestContext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002
TBR=jvanverth@google.com
Review URL: https://codereview.chromium.org/1849463002
Diffstat (limited to 'tools/gpu/gl')
-rw-r--r-- | tools/gpu/gl/GLTestContext.cpp (renamed from tools/gpu/gl/GLContext.cpp) | 32 | ||||
-rw-r--r-- | tools/gpu/gl/GLTestContext.h (renamed from tools/gpu/gl/GLContext.h) | 20 | ||||
-rw-r--r-- | tools/gpu/gl/angle/GLTestContext_angle.cpp (renamed from tools/gpu/gl/angle/GLContext_angle.cpp) | 16 | ||||
-rw-r--r-- | tools/gpu/gl/angle/GLTestContext_angle.h (renamed from tools/gpu/gl/angle/GLContext_angle.h) | 14 | ||||
-rw-r--r-- | tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp (renamed from tools/gpu/gl/command_buffer/GLContext_command_buffer.cpp) | 26 | ||||
-rw-r--r-- | tools/gpu/gl/command_buffer/GLTestContext_command_buffer.h (renamed from tools/gpu/gl/command_buffer/GLContext_command_buffer.h) | 22 | ||||
-rw-r--r-- | tools/gpu/gl/debug/DebugGLTestContext.cpp (renamed from tools/gpu/gl/debug/DebugGLContext.cpp) | 8 | ||||
-rw-r--r-- | tools/gpu/gl/debug/DebugGLTestContext.h (renamed from tools/gpu/gl/debug/DebugGLContext.h) | 4 | ||||
-rw-r--r-- | tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp (renamed from tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp) | 56 | ||||
-rw-r--r-- | tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp (renamed from tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp) | 27 | ||||
-rw-r--r-- | tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm (renamed from tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm) | 25 | ||||
-rw-r--r-- | tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp (renamed from tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp) | 25 | ||||
-rw-r--r-- | tools/gpu/gl/mesa/GLTestContext_mesa.cpp (renamed from tools/gpu/gl/mesa/GLContext_mesa.cpp) | 6 | ||||
-rw-r--r-- | tools/gpu/gl/mesa/GLTestContext_mesa.h (renamed from tools/gpu/gl/mesa/GLContext_mesa.h) | 8 | ||||
-rw-r--r-- | tools/gpu/gl/null/NullGLTestContext.cpp (renamed from tools/gpu/gl/null/NullGLContext.cpp) | 8 | ||||
-rw-r--r-- | tools/gpu/gl/null/NullGLTestContext.h (renamed from tools/gpu/gl/null/NullGLContext.h) | 4 | ||||
-rw-r--r-- | tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp (renamed from tools/gpu/gl/win/CreatePlatformGLContext_win.cpp) | 27 |
17 files changed, 167 insertions, 161 deletions
diff --git a/tools/gpu/gl/GLContext.cpp b/tools/gpu/gl/GLTestContext.cpp index ac0e310014..1069929bf2 100644 --- a/tools/gpu/gl/GLContext.cpp +++ b/tools/gpu/gl/GLTestContext.cpp @@ -5,14 +5,14 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "GLContext.h" +#include "GLTestContext.h" #include "gl/GrGLUtil.h" #include "SkGpuFenceSync.h" namespace sk_gpu_test { -class GLContext::GLFenceSync : public SkGpuFenceSync { +class GLTestContext::GLFenceSync : public SkGpuFenceSync { public: - static GLFenceSync* CreateIfSupported(const GLContext*); + static GLFenceSync* CreateIfSupported(const GLTestContext*); SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override; bool waitFence(SkPlatformGpuFence fence, bool flush) const override; @@ -38,12 +38,12 @@ private: typedef SkGpuFenceSync INHERITED; }; -GLContext::GLContext() +GLTestContext::GLTestContext() : fCurrentFenceIdx(0) { memset(fFrameFences, 0, sizeof(fFrameFences)); } -GLContext::~GLContext() { +GLTestContext::~GLTestContext() { // Subclass should call teardown. #ifdef SK_DEBUG for (size_t i = 0; i < SK_ARRAY_COUNT(fFrameFences); i++) { @@ -54,13 +54,13 @@ GLContext::~GLContext() { SkASSERT(nullptr == fFenceSync.get()); } -void GLContext::init(const GrGLInterface* gl, SkGpuFenceSync* fenceSync) { +void GLTestContext::init(const GrGLInterface* gl, SkGpuFenceSync* fenceSync) { SkASSERT(!fGL.get()); fGL.reset(gl); fFenceSync.reset(fenceSync ? fenceSync : GLFenceSync::CreateIfSupported(this)); } -void GLContext::teardown() { +void GLTestContext::teardown() { if (fFenceSync) { for (size_t i = 0; i < SK_ARRAY_COUNT(fFrameFences); i++) { if (fFrameFences[i]) { @@ -74,15 +74,15 @@ void GLContext::teardown() { fGL.reset(nullptr); } -void GLContext::makeCurrent() const { +void GLTestContext::makeCurrent() const { this->onPlatformMakeCurrent(); } -void GLContext::swapBuffers() { +void GLTestContext::swapBuffers() { this->onPlatformSwapBuffers(); } -void GLContext::waitOnSyncOrSwap() { +void GLTestContext::waitOnSyncOrSwap() { if (!fFenceSync) { // Fallback on the platform SwapBuffers method for synchronization. This may have no effect. this->swapBuffers(); @@ -100,7 +100,7 @@ void GLContext::waitOnSyncOrSwap() { fCurrentFenceIdx = (fCurrentFenceIdx + 1) % SK_ARRAY_COUNT(fFrameFences); } -void GLContext::testAbandon() { +void GLTestContext::testAbandon() { if (fGL) { fGL->abandon(); } @@ -109,7 +109,7 @@ void GLContext::testAbandon() { } } -GLContext::GLFenceSync* GLContext::GLFenceSync::CreateIfSupported(const GLContext* ctx) { +GLTestContext::GLFenceSync* GLTestContext::GLFenceSync::CreateIfSupported(const GLTestContext* ctx) { SkAutoTDelete<GLFenceSync> ret(new GLFenceSync); if (kGL_GrGLStandard == ctx->gl()->fStandard) { @@ -144,21 +144,21 @@ GLContext::GLFenceSync* GLContext::GLFenceSync::CreateIfSupported(const GLContex return ret.release(); } -SkPlatformGpuFence GLContext::GLFenceSync::insertFence() const { +SkPlatformGpuFence GLTestContext::GLFenceSync::insertFence() const { return fGLFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); } -bool GLContext::GLFenceSync::waitFence(SkPlatformGpuFence fence, bool flush) const { +bool GLTestContext::GLFenceSync::waitFence(SkPlatformGpuFence fence, bool flush) const { GLsync glsync = static_cast<GLsync>(fence); return GL_WAIT_FAILED != fGLClientWaitSync(glsync, flush ? GL_SYNC_FLUSH_COMMANDS_BIT : 0, -1); } -void GLContext::GLFenceSync::deleteFence(SkPlatformGpuFence fence) const { +void GLTestContext::GLFenceSync::deleteFence(SkPlatformGpuFence fence) const { GLsync glsync = static_cast<GLsync>(fence); fGLDeleteSync(glsync); } -GrGLint GLContext::createTextureRectangle(int width, int height, GrGLenum internalFormat, +GrGLint GLTestContext::createTextureRectangle(int width, int height, GrGLenum internalFormat, GrGLenum externalFormat, GrGLenum externalType, GrGLvoid* data) { if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL) >= GR_GL_VER(3, 1)) && diff --git a/tools/gpu/gl/GLContext.h b/tools/gpu/gl/GLTestContext.h index 3f47613722..d6054a8ba6 100644 --- a/tools/gpu/gl/GLContext.h +++ b/tools/gpu/gl/GLTestContext.h @@ -5,8 +5,8 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef GLContext_DEFINED -#define GLContext_DEFINED +#ifndef GLTestContext_DEFINED +#define GLTestContext_DEFINED #include "gl/GrGLInterface.h" #include "../private/SkGpuFenceSync.h" @@ -17,9 +17,9 @@ namespace sk_gpu_test { * Create an offscreen Oppengl context. Provides a GrGLInterface struct of function pointers for * the context. This class is intended for Skia's internal testing needs and not for general use. */ -class GLContext : public SkNoncopyable { +class GLTestContext : public SkNoncopyable { public: - virtual ~GLContext(); + virtual ~GLTestContext(); bool isValid() const { return NULL != gl(); } @@ -82,17 +82,17 @@ public: * Creates a new GL context of the same type and makes the returned context current * (if not null). */ - virtual GLContext *createNew() const { return nullptr; } + virtual GLTestContext *createNew() const { return nullptr; } class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL functionality. /* - * returns the fencesync object owned by this GLContext + * returns the fencesync object owned by this GLTestContext */ SkGpuFenceSync *fenceSync() { return fFenceSync.get(); } protected: - GLContext(); + GLTestContext(); /* * Methods that sublcasses must call from their constructors and destructors. @@ -128,14 +128,14 @@ private: /** Creates platform-dependent GL context object. The shareContext parameter is in an optional - * context with which to share display lists. This should be a pointer to an GLContext created - * with SkCreatePlatformGLContext. NULL indicates that no sharing is to take place. Returns a valid + * context with which to share display lists. This should be a pointer to an GLTestContext created + * with SkCreatePlatformGLTestContext. NULL indicates that no sharing is to take place. Returns a valid * gl context object or NULL if such can not be created. * Note: If Skia embedder needs a custom GL context that sets up the GL interface, this function * should be implemented by the embedder. Otherwise, the default implementation for the platform * should be compiled in the library. */ -GLContext* CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext = nullptr); +GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, GLTestContext *shareContext = nullptr); } // namespace sk_gpu_test #endif diff --git a/tools/gpu/gl/angle/GLContext_angle.cpp b/tools/gpu/gl/angle/GLTestContext_angle.cpp index f1e8aad509..d992be375a 100644 --- a/tools/gpu/gl/angle/GLContext_angle.cpp +++ b/tools/gpu/gl/angle/GLTestContext_angle.cpp @@ -6,7 +6,7 @@ * found in the LICENSE file. */ -#include "GLContext_angle.h" +#include "GLTestContext_angle.h" #include <EGL/egl.h> #include <EGL/eglext.h> @@ -84,7 +84,7 @@ void* get_angle_egl_display(void* nativeDisplay, bool useGLBackend) { return display; } -class ANGLEGLContext : public sk_gpu_test::GLContext { +class ANGLEGLContext : public sk_gpu_test::GLTestContext { public: ANGLEGLContext(bool preferGLBackend); ~ANGLEGLContext() override; @@ -92,7 +92,7 @@ public: GrEGLImage texture2DToEGLImage(GrGLuint texID) const override; void destroyEGLImage(GrEGLImage) const override; GrGLuint eglImageToExternalTexture(GrEGLImage) const override; - sk_gpu_test::GLContext* createNew() const override; + sk_gpu_test::GLTestContext* createNew() const override; private: void destroyGLContext(); @@ -223,12 +223,12 @@ GrGLuint ANGLEGLContext::eglImageToExternalTexture(GrEGLImage image) const { return texID; } -sk_gpu_test::GLContext* ANGLEGLContext::createNew() const { +sk_gpu_test::GLTestContext* ANGLEGLContext::createNew() const { #ifdef SK_BUILD_FOR_WIN - sk_gpu_test::GLContext* ctx = fIsGLBackend ? sk_gpu_test::CreateANGLEOpenGLGLContext() + sk_gpu_test::GLTestContext* ctx = fIsGLBackend ? sk_gpu_test::CreateANGLEOpenGLGLContext() : sk_gpu_test::CreateANGLEDirect3DGLContext(); #else - sk_gpu_test::GLContext* ctx = sk_gpu_test::CreateANGLEOpenGLGLContext(); + sk_gpu_test::GLTestContext* ctx = sk_gpu_test::CreateANGLEOpenGLGLTestContext(); #endif if (ctx) { ctx->makeCurrent(); @@ -299,7 +299,7 @@ const GrGLInterface* CreateANGLEGLInterface() { } #ifdef SK_BUILD_FOR_WIN -GLContext* CreateANGLEDirect3DGLContext() { +GLTestContext* CreateANGLEDirect3DGLTestContext() { ANGLEGLContext* ctx = new ANGLEGLContext(false); if (!ctx->isValid()) { delete ctx; @@ -309,7 +309,7 @@ GLContext* CreateANGLEDirect3DGLContext() { } #endif -GLContext* CreateANGLEOpenGLGLContext() { +GLTestContext* CreateANGLEOpenGLGLTestContext() { ANGLEGLContext* ctx = new ANGLEGLContext(true); if (!ctx->isValid()) { delete ctx; diff --git a/tools/gpu/gl/angle/GLContext_angle.h b/tools/gpu/gl/angle/GLTestContext_angle.h index 519ea6b5a3..0140477a54 100644 --- a/tools/gpu/gl/angle/GLContext_angle.h +++ b/tools/gpu/gl/angle/GLTestContext_angle.h @@ -5,10 +5,10 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef GLContext_angle_DEFINED -#define GLContext_angle_DEFINED +#ifndef GLTestContext_angle_DEFINED +#define GLTestContext_angle_DEFINED -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" namespace sk_gpu_test { @@ -19,12 +19,12 @@ namespace sk_gpu_test { const GrGLInterface* CreateANGLEGLInterface(); #ifdef SK_BUILD_FOR_WIN -/** Creates a GLContext backed by ANGLE's Direct3D backend. */ -GLContext* CreateANGLEDirect3DGLContext(); +/** Creates a GLTestContext backed by ANGLE's Direct3D backend. */ +GLTestContext* CreateANGLEDirect3DGLTestContext(); #endif -/** Creates a GLContext backed by ANGLE's OpenGL backend. */ -GLContext* CreateANGLEOpenGLGLContext(); +/** Creates a GLTestContext backed by ANGLE's OpenGL backend. */ +GLTestContext* CreateANGLEOpenGLGLTestContext(); } // namespace sk_gpu_test #endif diff --git a/tools/gpu/gl/command_buffer/GLContext_command_buffer.cpp b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp index b878cb4aa9..5985a2e31f 100644 --- a/tools/gpu/gl/command_buffer/GLContext_command_buffer.cpp +++ b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp @@ -9,7 +9,7 @@ #include "SkOnce.h" #include "gl/GrGLInterface.h" #include "gl/GrGLAssembleInterface.h" -#include "gl/command_buffer/GLContext_command_buffer.h" +#include "gl/command_buffer/GLTestContext_command_buffer.h" #include "../ports/SkOSEnvironment.h" #include "../ports/SkOSLibrary.h" @@ -143,7 +143,7 @@ static const GrGLInterface* create_command_buffer_interface() { namespace sk_gpu_test { -CommandBufferGLContext::CommandBufferGLContext() +CommandBufferGLTestContext::CommandBufferGLTestContext() : fContext(EGL_NO_CONTEXT), fDisplay(EGL_NO_DISPLAY), fSurface(EGL_NO_SURFACE) { static const EGLint configAttribs[] = { @@ -165,7 +165,7 @@ CommandBufferGLContext::CommandBufferGLContext() initializeGLContext(nullptr, configAttribs, surfaceAttribs); } -CommandBufferGLContext::CommandBufferGLContext(void *nativeWindow, int msaaSampleCount) { +CommandBufferGLTestContext::CommandBufferGLTestContext(void *nativeWindow, int msaaSampleCount) { static const EGLint surfaceAttribs[] = {EGL_NONE}; EGLint configAttribs[] = { @@ -186,7 +186,7 @@ CommandBufferGLContext::CommandBufferGLContext(void *nativeWindow, int msaaSampl initializeGLContext(nativeWindow, configAttribs, surfaceAttribs); } -void CommandBufferGLContext::initializeGLContext(void *nativeWindow, const int *configAttribs, +void CommandBufferGLTestContext::initializeGLContext(void *nativeWindow, const int *configAttribs, const int *surfaceAttribs) { load_command_buffer_once(); if (!gfFunctionsLoadedSuccessfully) { @@ -266,12 +266,12 @@ void CommandBufferGLContext::initializeGLContext(void *nativeWindow, const int * this->init(gl.release()); } -CommandBufferGLContext::~CommandBufferGLContext() { +CommandBufferGLTestContext::~CommandBufferGLTestContext() { this->teardown(); this->destroyGLContext(); } -void CommandBufferGLContext::destroyGLContext() { +void CommandBufferGLTestContext::destroyGLContext() { if (!gfFunctionsLoadedSuccessfully) { return; } @@ -293,7 +293,7 @@ void CommandBufferGLContext::destroyGLContext() { } } -void CommandBufferGLContext::onPlatformMakeCurrent() const { +void CommandBufferGLTestContext::onPlatformMakeCurrent() const { if (!gfFunctionsLoadedSuccessfully) { return; } @@ -302,7 +302,7 @@ void CommandBufferGLContext::onPlatformMakeCurrent() const { } } -void CommandBufferGLContext::onPlatformSwapBuffers() const { +void CommandBufferGLTestContext::onPlatformSwapBuffers() const { if (!gfFunctionsLoadedSuccessfully) { return; } @@ -311,14 +311,14 @@ void CommandBufferGLContext::onPlatformSwapBuffers() const { } } -GrGLFuncPtr CommandBufferGLContext::onPlatformGetProcAddress(const char *name) const { +GrGLFuncPtr CommandBufferGLTestContext::onPlatformGetProcAddress(const char *name) const { if (!gfFunctionsLoadedSuccessfully) { return nullptr; } return gfGetProcAddress(name); } -void CommandBufferGLContext::presentCommandBuffer() { +void CommandBufferGLTestContext::presentCommandBuffer() { if (this->gl()) { this->gl()->fFunctions.fFlush(); } @@ -326,17 +326,17 @@ void CommandBufferGLContext::presentCommandBuffer() { this->onPlatformSwapBuffers(); } -bool CommandBufferGLContext::makeCurrent() { +bool CommandBufferGLTestContext::makeCurrent() { return gfMakeCurrent(fDisplay, fSurface, fSurface, fContext) != EGL_FALSE; } -int CommandBufferGLContext::getStencilBits() { +int CommandBufferGLTestContext::getStencilBits() { EGLint result = 0; gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_STENCIL_SIZE, &result); return result; } -int CommandBufferGLContext::getSampleCount() { +int CommandBufferGLTestContext::getSampleCount() { EGLint result = 0; gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &result); return result; diff --git a/tools/gpu/gl/command_buffer/GLContext_command_buffer.h b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.h index 73f02e2c78..0994c98c8b 100644 --- a/tools/gpu/gl/command_buffer/GLContext_command_buffer.h +++ b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.h @@ -6,18 +6,18 @@ * found in the LICENSE file. */ -#ifndef GLContext_command_buffer_DEFINED -#define GLContext_command_buffer_DEFINED +#ifndef GLTestContext_command_buffer_DEFINED +#define GLTestContext_command_buffer_DEFINED -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" namespace sk_gpu_test { -class CommandBufferGLContext : public GLContext { +class CommandBufferGLTestContext : public GLTestContext { public: - ~CommandBufferGLContext() override; + ~CommandBufferGLTestContext() override; - static CommandBufferGLContext *Create() { - CommandBufferGLContext *ctx = new CommandBufferGLContext; + static CommandBufferGLTestContext *Create() { + CommandBufferGLTestContext *ctx = new CommandBufferGLTestContext; if (!ctx->isValid()) { delete ctx; return nullptr; @@ -25,8 +25,8 @@ public: return ctx; } - static CommandBufferGLContext *Create(void *nativeWindow, int msaaSampleCount) { - CommandBufferGLContext *ctx = new CommandBufferGLContext(nativeWindow, msaaSampleCount); + static CommandBufferGLTestContext *Create(void *nativeWindow, int msaaSampleCount) { + CommandBufferGLTestContext *ctx = new CommandBufferGLTestContext(nativeWindow, msaaSampleCount); if (!ctx->isValid()) { delete ctx; return nullptr; @@ -43,9 +43,9 @@ public: int getSampleCount(); private: - CommandBufferGLContext(); + CommandBufferGLTestContext(); - CommandBufferGLContext(void *nativeWindow, int msaaSampleCount); + CommandBufferGLTestContext(void *nativeWindow, int msaaSampleCount); void initializeGLContext(void *nativeWindow, const int *configAttribs, const int *surfaceAttribs); diff --git a/tools/gpu/gl/debug/DebugGLContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp index f4cbbea680..96640c5908 100644 --- a/tools/gpu/gl/debug/DebugGLContext.cpp +++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp @@ -6,7 +6,7 @@ * found in the LICENSE file. */ -#include "DebugGLContext.h" +#include "DebugGLTestContext.h" #include "GrBufferObj.h" #include "GrFrameBufferObj.h" @@ -1229,7 +1229,7 @@ const char* DebugInterface::kExtensions[] = { nullptr, // signifies the end of the array. }; -class DebugGLContext : public sk_gpu_test::GLContext { +class DebugGLContext : public sk_gpu_test::GLTestContext { public: DebugGLContext() { this->init(new DebugInterface()); @@ -1245,8 +1245,8 @@ private: } // anonymous namespace namespace sk_gpu_test { -GLContext* CreateDebugGLContext() { - GLContext* ctx = new DebugGLContext(); +GLTestContext* CreateDebugGLTestContext() { + GLTestContext* ctx = new DebugGLContext(); if (ctx->isValid()) { return ctx; } diff --git a/tools/gpu/gl/debug/DebugGLContext.h b/tools/gpu/gl/debug/DebugGLTestContext.h index 0ac505b632..3f2646bb8c 100644 --- a/tools/gpu/gl/debug/DebugGLContext.h +++ b/tools/gpu/gl/debug/DebugGLTestContext.h @@ -8,10 +8,10 @@ #ifndef DebugGLContext_DEFINED #define DebugGLContext_DEFINED -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" namespace sk_gpu_test { -GLContext* CreateDebugGLContext(); +GLTestContext* CreateDebugGLTestContext(); } // namespace sk_gpu_test #endif diff --git a/tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp index ac2e7ca7cf..ae61b337d9 100644 --- a/tools/gpu/gl/egl/CreatePlatformGLContext_egl.cpp +++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp @@ -5,8 +5,9 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" +#define GL_GLEXT_PROTOTYPES #include <GLES2/gl2.h> #define EGL_EGLEXT_PROTOTYPES @@ -19,31 +20,31 @@ namespace { // TODO: Share this class with ANGLE if/when it gets support for EGL_KHR_fence_sync. -class SkEGLFenceSync : public SkGpuFenceSync { +class EGLFenceSync : public SkGpuFenceSync { public: - static SkEGLFenceSync* CreateIfSupported(EGLDisplay); + static EGLFenceSync* CreateIfSupported(EGLDisplay); SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override; bool waitFence(SkPlatformGpuFence fence, bool flush) const override; void deleteFence(SkPlatformGpuFence fence) const override; private: - SkEGLFenceSync(EGLDisplay display) : fDisplay(display) {} + EGLFenceSync(EGLDisplay display) : fDisplay(display) {} EGLDisplay fDisplay; typedef SkGpuFenceSync INHERITED; }; -class EGLGLContext : public sk_gpu_test::GLContext { +class EGLGLTestContext : public sk_gpu_test::GLTestContext { public: - EGLGLContext(GrGLStandard forcedGpuAPI); - ~EGLGLContext() override; + EGLGLTestContext(GrGLStandard forcedGpuAPI); + ~EGLGLTestContext() override; GrEGLImage texture2DToEGLImage(GrGLuint texID) const override; void destroyEGLImage(GrEGLImage) const override; GrGLuint eglImageToExternalTexture(GrEGLImage) const override; - sk_gpu_test::GLContext* createNew() const override; + sk_gpu_test::GLTestContext* createNew() const override; private: void destroyGLContext(); @@ -57,7 +58,7 @@ private: EGLSurface fSurface; }; -EGLGLContext::EGLGLContext(GrGLStandard forcedGpuAPI) +EGLGLTestContext::EGLGLTestContext(GrGLStandard forcedGpuAPI) : fContext(EGL_NO_CONTEXT) , fDisplay(EGL_NO_DISPLAY) , fSurface(EGL_NO_SURFACE) { @@ -179,17 +180,17 @@ EGLGLContext::EGLGLContext(GrGLStandard forcedGpuAPI) continue; } - this->init(gl.release(), SkEGLFenceSync::CreateIfSupported(fDisplay)); + this->init(gl.release(), EGLFenceSync::CreateIfSupported(fDisplay)); break; } } -EGLGLContext::~EGLGLContext() { +EGLGLTestContext::~EGLGLTestContext() { this->teardown(); this->destroyGLContext(); } -void EGLGLContext::destroyGLContext() { +void EGLGLTestContext::destroyGLContext() { if (fDisplay) { eglMakeCurrent(fDisplay, 0, 0, 0); @@ -208,7 +209,7 @@ void EGLGLContext::destroyGLContext() { } } -GrEGLImage EGLGLContext::texture2DToEGLImage(GrGLuint texID) const { +GrEGLImage EGLGLTestContext::texture2DToEGLImage(GrGLuint texID) const { if (!this->gl()->hasExtension("EGL_KHR_gl_texture_2D_image")) { return GR_EGL_NO_IMAGE; } @@ -220,11 +221,11 @@ GrEGLImage EGLGLContext::texture2DToEGLImage(GrGLuint texID) const { return img; } -void EGLGLContext::destroyEGLImage(GrEGLImage image) const { +void EGLGLTestContext::destroyEGLImage(GrEGLImage image) const { GR_GL_CALL(this->gl(), EGLDestroyImage(fDisplay, image)); } -GrGLuint EGLGLContext::eglImageToExternalTexture(GrEGLImage image) const { +GrGLuint EGLGLTestContext::eglImageToExternalTexture(GrEGLImage image) const { GrGLClearErr(this->gl()); if (!this->gl()->hasExtension("GL_OES_EGL_image_external")) { return 0; @@ -254,27 +255,27 @@ GrGLuint EGLGLContext::eglImageToExternalTexture(GrEGLImage image) const { return texID; } -sk_gpu_test::GLContext* EGLGLContext::createNew() const { - sk_gpu_test::GLContext* ctx = new EGLGLContext(this->gl()->fStandard); +sk_gpu_test::GLTestContext* EGLGLTestContext::createNew() const { + sk_gpu_test::GLTestContext* ctx = new EGLGLTestContext(this->gl()->fStandard); if (ctx) { ctx->makeCurrent(); } return ctx; } -void EGLGLContext::onPlatformMakeCurrent() const { +void EGLGLTestContext::onPlatformMakeCurrent() const { if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) { SkDebugf("Could not set the context.\n"); } } -void EGLGLContext::onPlatformSwapBuffers() const { +void EGLGLTestContext::onPlatformSwapBuffers() const { if (!eglSwapBuffers(fDisplay, fSurface)) { SkDebugf("Could not complete eglSwapBuffers.\n"); } } -GrGLFuncPtr EGLGLContext::onPlatformGetProcAddress(const char* procName) const { +GrGLFuncPtr EGLGLTestContext::onPlatformGetProcAddress(const char* procName) const { return eglGetProcAddress(procName); } @@ -293,18 +294,18 @@ static bool supports_egl_extension(EGLDisplay display, const char* extension) { return false; } -SkEGLFenceSync* SkEGLFenceSync::CreateIfSupported(EGLDisplay display) { +EGLFenceSync* EGLFenceSync::CreateIfSupported(EGLDisplay display) { if (!display || !supports_egl_extension(display, "EGL_KHR_fence_sync")) { return nullptr; } - return new SkEGLFenceSync(display); + return new EGLFenceSync(display); } -SkPlatformGpuFence SkEGLFenceSync::insertFence() const { +SkPlatformGpuFence EGLFenceSync::insertFence() const { return eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, nullptr); } -bool SkEGLFenceSync::waitFence(SkPlatformGpuFence platformFence, bool flush) const { +bool EGLFenceSync::waitFence(SkPlatformGpuFence platformFence, bool flush) const { EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence); return EGL_CONDITION_SATISFIED_KHR == eglClientWaitSyncKHR(fDisplay, @@ -313,7 +314,7 @@ bool SkEGLFenceSync::waitFence(SkPlatformGpuFence platformFence, bool flush) con EGL_FOREVER_KHR); } -void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { +void EGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence); eglDestroySyncKHR(fDisplay, eglsync); } @@ -321,12 +322,13 @@ void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { } // anonymous namespace namespace sk_gpu_test { -GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) { +GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, + GLTestContext *shareContext) { SkASSERT(!shareContext); if (shareContext) { return nullptr; } - EGLGLContext *ctx = new EGLGLContext(forcedGpuAPI); + EGLGLTestContext *ctx = new EGLGLTestContext(forcedGpuAPI); if (!ctx->isValid()) { delete ctx; return nullptr; diff --git a/tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp index b2168e3c5a..7429bed630 100644 --- a/tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp +++ b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp @@ -5,7 +5,7 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" #include <X11/Xlib.h> #include <GL/glx.h> @@ -44,10 +44,10 @@ static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) { return 0; } -class GLXGLContext : public sk_gpu_test::GLContext { +class GLXGLTestContext : public sk_gpu_test::GLTestContext { public: - GLXGLContext(GrGLStandard forcedGpuAPI, GLXGLContext* shareList); - ~GLXGLContext() override; + GLXGLTestContext(GrGLStandard forcedGpuAPI, GLXGLTestContext* shareList); + ~GLXGLTestContext() override; private: void destroyGLContext(); @@ -62,7 +62,7 @@ private: GLXPixmap fGlxPixmap; }; -GLXGLContext::GLXGLContext(GrGLStandard forcedGpuAPI, GLXGLContext* shareContext) +GLXGLTestContext::GLXGLTestContext(GrGLStandard forcedGpuAPI, GLXGLTestContext* shareContext) : fContext(nullptr) , fDisplay(nullptr) , fPixmap(0) @@ -288,12 +288,12 @@ GLXGLContext::GLXGLContext(GrGLStandard forcedGpuAPI, GLXGLContext* shareContext } -GLXGLContext::~GLXGLContext() { +GLXGLTestContext::~GLXGLTestContext() { this->teardown(); this->destroyGLContext(); } -void GLXGLContext::destroyGLContext() { +void GLXGLTestContext::destroyGLContext() { if (fDisplay) { glXMakeCurrent(fDisplay, 0, 0); @@ -317,26 +317,27 @@ void GLXGLContext::destroyGLContext() { } } -void GLXGLContext::onPlatformMakeCurrent() const { +void GLXGLTestContext::onPlatformMakeCurrent() const { if (!glXMakeCurrent(fDisplay, fGlxPixmap, fContext)) { SkDebugf("Could not set the context.\n"); } } -void GLXGLContext::onPlatformSwapBuffers() const { +void GLXGLTestContext::onPlatformSwapBuffers() const { glXSwapBuffers(fDisplay, fGlxPixmap); } -GrGLFuncPtr GLXGLContext::onPlatformGetProcAddress(const char* procName) const { +GrGLFuncPtr GLXGLTestContext::onPlatformGetProcAddress(const char* procName) const { return glXGetProcAddress(reinterpret_cast<const GLubyte*>(procName)); } } // anonymous namespace namespace sk_gpu_test { -GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) { - GLXGLContext *glxShareContext = reinterpret_cast<GLXGLContext *>(shareContext); - GLXGLContext *ctx = new GLXGLContext(forcedGpuAPI, glxShareContext); +GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, + GLTestContext *shareContext) { + GLXGLTestContext *glxShareContext = reinterpret_cast<GLXGLTestContext *>(shareContext); + GLXGLTestContext *ctx = new GLXGLTestContext(forcedGpuAPI, glxShareContext); if (!ctx->isValid()) { delete ctx; return nullptr; diff --git a/tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm index d6507f280f..d31cb86958 100644 --- a/tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm +++ b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm @@ -6,7 +6,7 @@ * found in the LICENSE file. */ -#include "GLContext.h" +#include "GLTestContext.h" #import <OpenGLES/EAGL.h> #include <dlfcn.h> @@ -14,10 +14,10 @@ namespace { -class IOSGLContext : public sk_gpu_test::GLContext { +class IOSGLTestContext : public sk_gpu_test::GLTestContext { public: - IOSGLContext(); - ~IOSGLContext() override; + IOSGLTestContext(); + ~IOSGLTestContext() override; private: void destroyGLContext(); @@ -30,7 +30,7 @@ private: void* fGLLibrary; }; -IOSGLContext::IOSGLContext() +IOSGLTestContext::IOSGLTestContext() : fEAGLContext(NULL) , fGLLibrary(RTLD_DEFAULT) { @@ -56,12 +56,12 @@ IOSGLContext::IOSGLContext() this->init(gl.release()); } -IOSGLContext::~IOSGLContext() { +IOSGLTestContext::~IOSGLTestContext() { this->teardown(); this->destroyGLContext(); } -void IOSGLContext::destroyGLContext() { +void IOSGLTestContext::destroyGLContext() { if (fEAGLContext) { if ([EAGLContext currentContext] == EAGLCTX) { [EAGLContext setCurrentContext:nil]; @@ -75,22 +75,23 @@ void IOSGLContext::destroyGLContext() { } -void IOSGLContext::onPlatformMakeCurrent() const { +void IOSGLTestContext::onPlatformMakeCurrent() const { if (![EAGLContext setCurrentContext:EAGLCTX]) { SkDebugf("Could not set the context.\n"); } } -void IOSGLContext::onPlatformSwapBuffers() const { } +void IOSGLTestContext::onPlatformSwapBuffers() const { } -GrGLFuncPtr IOSGLContext::onPlatformGetProcAddress(const char* procName) const { +GrGLFuncPtr IOSGLTestContext::onPlatformGetProcAddress(const char* procName) const { return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); } } // anonymous namespace namespace sk_gpu_test { -GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) { +GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, + GLTestContext *shareContext) { SkASSERT(!shareContext); if (shareContext) { return NULL; @@ -98,7 +99,7 @@ GLContext *CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareCo if (kGL_GrGLStandard == forcedGpuAPI) { return NULL; } - IOSGLContext *ctx = new IOSGLContext; + IOSGLTestContext *ctx = new IOSGLTestContext; if (!ctx->isValid()) { delete ctx; return NULL; diff --git a/tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp b/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp index 7da99d7eb5..b2cdaacd8a 100644 --- a/tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp +++ b/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp @@ -7,17 +7,17 @@ */ #include "SkTypes.h" -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" #include "AvailabilityMacros.h" #include <OpenGL/OpenGL.h> #include <dlfcn.h> namespace { -class MacGLContext : public sk_gpu_test::GLContext { +class MacGLTestContext : public sk_gpu_test::GLTestContext { public: - MacGLContext(); - ~MacGLContext() override; + MacGLTestContext(); + ~MacGLTestContext() override; private: void destroyGLContext(); @@ -30,7 +30,7 @@ private: void* fGLLibrary; }; -MacGLContext::MacGLContext() +MacGLTestContext::MacGLTestContext() : fContext(nullptr) , fGLLibrary(RTLD_DEFAULT) { CGLPixelFormatAttribute attributes[] = { @@ -79,12 +79,12 @@ MacGLContext::MacGLContext() this->init(gl.release()); } -MacGLContext::~MacGLContext() { +MacGLTestContext::~MacGLTestContext() { this->teardown(); this->destroyGLContext(); } -void MacGLContext::destroyGLContext() { +void MacGLTestContext::destroyGLContext() { if (fContext) { CGLReleaseContext(fContext); fContext = nullptr; @@ -94,22 +94,23 @@ void MacGLContext::destroyGLContext() { } } -void MacGLContext::onPlatformMakeCurrent() const { +void MacGLTestContext::onPlatformMakeCurrent() const { CGLSetCurrentContext(fContext); } -void MacGLContext::onPlatformSwapBuffers() const { +void MacGLTestContext::onPlatformSwapBuffers() const { CGLFlushDrawable(fContext); } -GrGLFuncPtr MacGLContext::onPlatformGetProcAddress(const char* procName) const { +GrGLFuncPtr MacGLTestContext::onPlatformGetProcAddress(const char* procName) const { return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); } } // anonymous namespace namespace sk_gpu_test { -GLContext* CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext* shareContext) { +GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, + GLTestContext* shareContext) { SkASSERT(!shareContext); if (shareContext) { return nullptr; @@ -118,7 +119,7 @@ GLContext* CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext* shareCo if (kGLES_GrGLStandard == forcedGpuAPI) { return nullptr; } - MacGLContext* ctx = new MacGLContext; + MacGLTestContext* ctx = new MacGLTestContext; if (!ctx->isValid()) { delete ctx; return nullptr; diff --git a/tools/gpu/gl/mesa/GLContext_mesa.cpp b/tools/gpu/gl/mesa/GLTestContext_mesa.cpp index e6cc7c7f4b..e0cf9c198a 100644 --- a/tools/gpu/gl/mesa/GLContext_mesa.cpp +++ b/tools/gpu/gl/mesa/GLTestContext_mesa.cpp @@ -8,7 +8,7 @@ #include <GL/osmesa.h> -#include "gl/mesa/GLContext_mesa.h" +#include "gl/mesa/GLTestContext_mesa.h" #include "gl/GrGLDefines.h" #include "gl/GrGLAssembleInterface.h" @@ -32,7 +32,7 @@ static const GrGLInterface* create_mesa_interface() { static const GrGLint gBOGUS_SIZE = 16; -class MesaGLContext : public sk_gpu_test::GLContext { +class MesaGLContext : public sk_gpu_test::GLTestContext { private: typedef intptr_t Context; @@ -140,7 +140,7 @@ GrGLFuncPtr MesaGLContext::onPlatformGetProcAddress(const char *procName) const namespace sk_gpu_test { -GLContext *CreateMesaGLContext() { +GLTestContext *CreateMesaGLTestContext() { MesaGLContext *ctx = new MesaGLContext; if (!ctx->isValid()) { delete ctx; diff --git a/tools/gpu/gl/mesa/GLContext_mesa.h b/tools/gpu/gl/mesa/GLTestContext_mesa.h index 0d6ee4dc10..17c072e679 100644 --- a/tools/gpu/gl/mesa/GLContext_mesa.h +++ b/tools/gpu/gl/mesa/GLTestContext_mesa.h @@ -5,13 +5,13 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef GLContext_mesa_DEFINED -#define GLContext_mesa_DEFINED +#ifndef GLTestContext_mesa_DEFINED +#define GLTestContext_mesa_DEFINED -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" namespace sk_gpu_test { -GLContext* CreateMesaGLContext(); +GLTestContext* CreateMesaGLTestContext(); } // namespace sk_gpu_test #endif diff --git a/tools/gpu/gl/null/NullGLContext.cpp b/tools/gpu/gl/null/NullGLTestContext.cpp index 4781c90e4f..44abf59370 100644 --- a/tools/gpu/gl/null/NullGLContext.cpp +++ b/tools/gpu/gl/null/NullGLTestContext.cpp @@ -6,7 +6,7 @@ * found in the LICENSE file. */ -#include "NullGLContext.h" +#include "NullGLTestContext.h" #include "gl/GrGLTestInterface.h" #include "gl/GrGLDefines.h" #include "gl/GrGLInterface.h" @@ -605,7 +605,7 @@ const char* NullInterface::kExtensions[] = { nullptr, // signifies the end of the array. }; -class NullGLContext : public sk_gpu_test::GLContext { +class NullGLContext : public sk_gpu_test::GLTestContext { public: NullGLContext() { this->init(new NullInterface); } ~NullGLContext() override { this->teardown(); } @@ -618,8 +618,8 @@ private: } // anonymous namespace namespace sk_gpu_test { -GLContext* CreateNullGLContext() { - GLContext* ctx = new NullGLContext(); +GLTestContext* CreateNullGLTestContext() { + GLTestContext* ctx = new NullGLContext(); if (ctx->isValid()) { return ctx; } diff --git a/tools/gpu/gl/null/NullGLContext.h b/tools/gpu/gl/null/NullGLTestContext.h index 16fb9fd1df..ebde61a4c2 100644 --- a/tools/gpu/gl/null/NullGLContext.h +++ b/tools/gpu/gl/null/NullGLTestContext.h @@ -8,10 +8,10 @@ #ifndef NullGLContext_DEFINED #define NullGLContext_DEFINED -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" namespace sk_gpu_test { -GLContext* CreateNullGLContext(); +GLTestContext* CreateNullGLTestContext(); } // namespace sk_gpu_test #endif diff --git a/tools/gpu/gl/win/CreatePlatformGLContext_win.cpp b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp index efee28b74b..3d70be82cd 100644 --- a/tools/gpu/gl/win/CreatePlatformGLContext_win.cpp +++ b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp @@ -6,7 +6,7 @@ * found in the LICENSE file. */ -#include "gl/GLContext.h" +#include "gl/GLTestContext.h" #include <windows.h> #include <GL/GL.h> @@ -17,10 +17,10 @@ namespace { -class WinGLContext : public sk_gpu_test::GLContext { +class WinGLTestContext : public sk_gpu_test::GLTestContext { public: - WinGLContext(GrGLStandard forcedGpuAPI); - ~WinGLContext() override; + WinGLTestContext(GrGLStandard forcedGpuAPI); + ~WinGLTestContext() override; private: void destroyGLContext(); @@ -36,9 +36,9 @@ private: SkWGLPbufferContext* fPbufferContext; }; -ATOM WinGLContext::gWC = 0; +ATOM WinGLTestContext::gWC = 0; -WinGLContext::WinGLContext(GrGLStandard forcedGpuAPI) +WinGLTestContext::WinGLTestContext(GrGLStandard forcedGpuAPI) : fWindow(nullptr) , fDeviceContext(nullptr) , fGlRenderContext(0) @@ -130,12 +130,12 @@ WinGLContext::WinGLContext(GrGLStandard forcedGpuAPI) this->init(gl.release()); } -WinGLContext::~WinGLContext() { +WinGLTestContext::~WinGLTestContext() { this->teardown(); this->destroyGLContext(); } -void WinGLContext::destroyGLContext() { +void WinGLTestContext::destroyGLContext() { SkSafeSetNull(fPbufferContext); if (fGlRenderContext) { wglDeleteContext(fGlRenderContext); @@ -151,7 +151,7 @@ void WinGLContext::destroyGLContext() { } } -void WinGLContext::onPlatformMakeCurrent() const { +void WinGLTestContext::onPlatformMakeCurrent() const { HDC dc; HGLRC glrc; @@ -168,7 +168,7 @@ void WinGLContext::onPlatformMakeCurrent() const { } } -void WinGLContext::onPlatformSwapBuffers() const { +void WinGLTestContext::onPlatformSwapBuffers() const { HDC dc; if (nullptr == fPbufferContext) { @@ -181,19 +181,20 @@ void WinGLContext::onPlatformSwapBuffers() const { } } -GrGLFuncPtr WinGLContext::onPlatformGetProcAddress(const char* name) const { +GrGLFuncPtr WinGLTestContext::onPlatformGetProcAddress(const char* name) const { return reinterpret_cast<GrGLFuncPtr>(wglGetProcAddress(name)); } } // anonymous namespace namespace sk_gpu_test { -GLContext* CreatePlatformGLContext(GrGLStandard forcedGpuAPI, GLContext *shareContext) { +GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, + GLTestContext *shareContext) { SkASSERT(!shareContext); if (shareContext) { return nullptr; } - WinGLContext *ctx = new WinGLContext(forcedGpuAPI); + WinGLTestContext *ctx = new WinGLTestContext(forcedGpuAPI); if (!ctx->isValid()) { delete ctx; return nullptr; |