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

Unified Diff: tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.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/glx/CreatePlatformGLContext_glx.cpp ('k') | tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
diff --git a/tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
similarity index 92%
rename from tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp
rename to tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
index b2168e3c5a53f32ec18a2fcc17cac0e2885e92fe..7429bed630b3adb47c59e9164690421a18c6d88b 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;
« no previous file with comments | « tools/gpu/gl/glx/CreatePlatformGLContext_glx.cpp ('k') | tools/gpu/gl/iOS/CreatePlatformGLContext_iOS.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698