robertphillips@google.com | 0da3719 | 2012-03-19 14:42:13 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2012 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 SkDebugGLContext_DEFINED |
| 9 | #define SkDebugGLContext_DEFINED |
| 10 | |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 11 | #include "gl/SkGLContext.h" |
robertphillips@google.com | 0da3719 | 2012-03-19 14:42:13 +0000 | [diff] [blame] | 12 | |
kkinnunen | 9e61bb7 | 2014-10-09 05:24:15 -0700 | [diff] [blame] | 13 | class SkDebugGLContext : public SkGLContext { |
robertphillips@google.com | 0da3719 | 2012-03-19 14:42:13 +0000 | [diff] [blame] | 14 | public: |
mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 15 | ~SkDebugGLContext() SK_OVERRIDE; |
| 16 | void makeCurrent() const SK_OVERRIDE {} |
| 17 | void swapBuffers() const SK_OVERRIDE {} |
robertphillips@google.com | 0da3719 | 2012-03-19 14:42:13 +0000 | [diff] [blame] | 18 | |
kkinnunen | 30bc88c | 2014-10-15 23:03:54 -0700 | [diff] [blame] | 19 | static SkDebugGLContext* Create(GrGLStandard forcedGpuAPI) { |
| 20 | if (kGLES_GrGLStandard == forcedGpuAPI) { |
| 21 | return NULL; |
| 22 | } |
| 23 | return SkNEW(SkDebugGLContext); |
| 24 | } |
| 25 | private: |
| 26 | SkDebugGLContext(); |
robertphillips@google.com | 0da3719 | 2012-03-19 14:42:13 +0000 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | #endif |