| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "DebugGLContext.h" | 9 #include "DebugGLTestContext.h" |
| 10 | 10 |
| 11 #include "GrBufferObj.h" | 11 #include "GrBufferObj.h" |
| 12 #include "GrFrameBufferObj.h" | 12 #include "GrFrameBufferObj.h" |
| 13 #include "GrProgramObj.h" | 13 #include "GrProgramObj.h" |
| 14 #include "GrRenderBufferObj.h" | 14 #include "GrRenderBufferObj.h" |
| 15 #include "GrShaderObj.h" | 15 #include "GrShaderObj.h" |
| 16 #include "GrTextureObj.h" | 16 #include "GrTextureObj.h" |
| 17 #include "GrTextureUnitObj.h" | 17 #include "GrTextureUnitObj.h" |
| 18 #include "GrVertexArrayObj.h" | 18 #include "GrVertexArrayObj.h" |
| 19 #include "gl/GrGLTestInterface.h" | 19 #include "gl/GrGLTestInterface.h" |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 const char* DebugInterface::kExtensions[] = { | 1222 const char* DebugInterface::kExtensions[] = { |
| 1223 "GL_ARB_framebuffer_object", | 1223 "GL_ARB_framebuffer_object", |
| 1224 "GL_ARB_blend_func_extended", | 1224 "GL_ARB_blend_func_extended", |
| 1225 "GL_ARB_timer_query", | 1225 "GL_ARB_timer_query", |
| 1226 "GL_ARB_draw_buffers", | 1226 "GL_ARB_draw_buffers", |
| 1227 "GL_ARB_occlusion_query", | 1227 "GL_ARB_occlusion_query", |
| 1228 "GL_EXT_stencil_wrap", | 1228 "GL_EXT_stencil_wrap", |
| 1229 nullptr, // signifies the end of the array. | 1229 nullptr, // signifies the end of the array. |
| 1230 }; | 1230 }; |
| 1231 | 1231 |
| 1232 class DebugGLContext : public sk_gpu_test::GLContext { | 1232 class DebugGLContext : public sk_gpu_test::GLTestContext { |
| 1233 public: | 1233 public: |
| 1234 DebugGLContext() { | 1234 DebugGLContext() { |
| 1235 this->init(new DebugInterface()); | 1235 this->init(new DebugInterface()); |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 ~DebugGLContext() override { this->teardown(); } | 1238 ~DebugGLContext() override { this->teardown(); } |
| 1239 | 1239 |
| 1240 private: | 1240 private: |
| 1241 void onPlatformMakeCurrent() const override {} | 1241 void onPlatformMakeCurrent() const override {} |
| 1242 void onPlatformSwapBuffers() const override {} | 1242 void onPlatformSwapBuffers() const override {} |
| 1243 GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nu
llptr; } | 1243 GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nu
llptr; } |
| 1244 }; | 1244 }; |
| 1245 } // anonymous namespace | 1245 } // anonymous namespace |
| 1246 | 1246 |
| 1247 namespace sk_gpu_test { | 1247 namespace sk_gpu_test { |
| 1248 GLContext* CreateDebugGLContext() { | 1248 GLTestContext* CreateDebugGLTestContext() { |
| 1249 GLContext* ctx = new DebugGLContext(); | 1249 GLTestContext* ctx = new DebugGLContext(); |
| 1250 if (ctx->isValid()) { | 1250 if (ctx->isValid()) { |
| 1251 return ctx; | 1251 return ctx; |
| 1252 } | 1252 } |
| 1253 delete ctx; | 1253 delete ctx; |
| 1254 return nullptr; | 1254 return nullptr; |
| 1255 } | 1255 } |
| 1256 } | 1256 } |
| OLD | NEW |