aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/command_buffer
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-03-31 10:59:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-31 10:59:06 -0700
commit273c0f5e87397c40d22bb7e3ee078bb46a3f6860 (patch)
tree70436fd146c39be9702c6c295a8fd204a38d865f /tools/gpu/gl/command_buffer
parenta5598a40f82d69113fb4764dcb8de62151921807 (diff)
rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext
Diffstat (limited to 'tools/gpu/gl/command_buffer')
-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
2 files changed, 24 insertions, 24 deletions
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);