aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/mac
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/mac
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/mac')
-rw-r--r--tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp (renamed from tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp)25
1 files changed, 13 insertions, 12 deletions
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;