robertphillips | 6f70d43 | 2016-03-30 09:26:24 -0700 | [diff] [blame^] | 1 | |
| 2 | /* |
| 3 | * Copyright 2011 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | #ifndef SkNullGLContext_DEFINED |
| 9 | #define SkNullGLContext_DEFINED |
| 10 | |
| 11 | #include "gl/SkGLContext.h" |
| 12 | |
| 13 | class SK_API SkNullGLContext : public SkGLContext { |
| 14 | public: |
| 15 | ~SkNullGLContext() override; |
| 16 | static SkNullGLContext* Create(); |
| 17 | |
| 18 | private: |
| 19 | SkNullGLContext(); |
| 20 | |
| 21 | void onPlatformMakeCurrent() const override {}; |
| 22 | void onPlatformSwapBuffers() const override {} |
| 23 | GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nullptr; } |
| 24 | }; |
| 25 | |
| 26 | #endif |