aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/win
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-03-31 10:07:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-31 10:07:24 -0700
commit4c7f0a16312c374eba4e8d5d46435ce9eb0b9971 (patch)
tree8b5e597a2577667fba4aa1e9d4eb8ede2c545ffb /tools/gpu/gl/win
parent51a315eff9b86bd60e7884240c4efc199129d37a (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/win')
-rw-r--r--tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp (renamed from tools/gpu/gl/win/CreatePlatformGLContext_win.cpp)27
1 files changed, 14 insertions, 13 deletions
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;