Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp

Issue 1849463002: rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext (Closed) Base URL: https://chromium.googlesource.com/skia.git@move
Patch Set: readd gpu.gypi Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp ('k') | tools/gpu/gl/mesa/GLContext_mesa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
diff --git a/tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp b/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
similarity index 79%
rename from tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp
rename to tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
index 7da99d7eb5b99d89167bebe6d6a6e493b6309f99..b2cdaacd8ad1afcdc8397f05002df4874bb67591 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;
« no previous file with comments | « tools/gpu/gl/mac/CreatePlatformGLContext_mac.cpp ('k') | tools/gpu/gl/mesa/GLContext_mesa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698