| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 "NullGLContext.h" | 9 #include "NullGLTestContext.h" |
| 10 #include "gl/GrGLTestInterface.h" | 10 #include "gl/GrGLTestInterface.h" |
| 11 #include "gl/GrGLDefines.h" | 11 #include "gl/GrGLDefines.h" |
| 12 #include "gl/GrGLInterface.h" | 12 #include "gl/GrGLInterface.h" |
| 13 #include "gl/GrGLTypes.h" | 13 #include "gl/GrGLTypes.h" |
| 14 #include "SkMutex.h" | 14 #include "SkMutex.h" |
| 15 #include "SkTDArray.h" | 15 #include "SkTDArray.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 class BufferObj { | 19 class BufferObj { |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 const char* NullInterface::kExtensions[] = { | 598 const char* NullInterface::kExtensions[] = { |
| 599 "GL_ARB_framebuffer_object", | 599 "GL_ARB_framebuffer_object", |
| 600 "GL_ARB_blend_func_extended", | 600 "GL_ARB_blend_func_extended", |
| 601 "GL_ARB_timer_query", | 601 "GL_ARB_timer_query", |
| 602 "GL_ARB_draw_buffers", | 602 "GL_ARB_draw_buffers", |
| 603 "GL_ARB_occlusion_query", | 603 "GL_ARB_occlusion_query", |
| 604 "GL_EXT_stencil_wrap", | 604 "GL_EXT_stencil_wrap", |
| 605 nullptr, // signifies the end of the array. | 605 nullptr, // signifies the end of the array. |
| 606 }; | 606 }; |
| 607 | 607 |
| 608 class NullGLContext : public sk_gpu_test::GLContext { | 608 class NullGLContext : public sk_gpu_test::GLTestContext { |
| 609 public: | 609 public: |
| 610 NullGLContext() { this->init(new NullInterface); } | 610 NullGLContext() { this->init(new NullInterface); } |
| 611 ~NullGLContext() override { this->teardown(); } | 611 ~NullGLContext() override { this->teardown(); } |
| 612 | 612 |
| 613 private: | 613 private: |
| 614 void onPlatformMakeCurrent() const override {}; | 614 void onPlatformMakeCurrent() const override {}; |
| 615 void onPlatformSwapBuffers() const override {} | 615 void onPlatformSwapBuffers() const override {} |
| 616 GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nu
llptr; } | 616 GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nu
llptr; } |
| 617 }; | 617 }; |
| 618 } // anonymous namespace | 618 } // anonymous namespace |
| 619 | 619 |
| 620 namespace sk_gpu_test { | 620 namespace sk_gpu_test { |
| 621 GLContext* CreateNullGLContext() { | 621 GLTestContext* CreateNullGLTestContext() { |
| 622 GLContext* ctx = new NullGLContext(); | 622 GLTestContext* ctx = new NullGLContext(); |
| 623 if (ctx->isValid()) { | 623 if (ctx->isValid()) { |
| 624 return ctx; | 624 return ctx; |
| 625 } | 625 } |
| 626 delete ctx; | 626 delete ctx; |
| 627 return nullptr; | 627 return nullptr; |
| 628 } | 628 } |
| 629 } // namespace sk_gpu_test | 629 } // namespace sk_gpu_test |
| 630 | 630 |
| OLD | NEW |