diff options
author | 2014-11-13 11:12:41 -0800 | |
---|---|---|
committer | 2014-11-13 11:12:41 -0800 | |
commit | e4545210c950f98d9fa20f51bc1be6c5591534bd (patch) | |
tree | 0485f434709c8c1ad9ffb43ea5a63e5c013fc71b /src/gpu/gl/debug/SkDebugGLContext.h | |
parent | 912c9ec6ee8e28724861f0ac2b746e970895f745 (diff) |
Cleanup GrContextFactory and make it's subclasses private
Review URL: https://codereview.chromium.org/723183002
Diffstat (limited to 'src/gpu/gl/debug/SkDebugGLContext.h')
-rw-r--r-- | src/gpu/gl/debug/SkDebugGLContext.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gpu/gl/debug/SkDebugGLContext.h b/src/gpu/gl/debug/SkDebugGLContext.h new file mode 100644 index 0000000000..7dca67f320 --- /dev/null +++ b/src/gpu/gl/debug/SkDebugGLContext.h @@ -0,0 +1,29 @@ + +/* + * Copyright 2012 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef SkDebugGLContext_DEFINED +#define SkDebugGLContext_DEFINED + +#include "gl/SkGLContext.h" + +class SkDebugGLContext : public SkGLContext { +public: + virtual ~SkDebugGLContext() SK_OVERRIDE; + virtual void makeCurrent() const SK_OVERRIDE {} + virtual void swapBuffers() const SK_OVERRIDE {} + + static SkDebugGLContext* Create(GrGLStandard forcedGpuAPI) { + if (kGLES_GrGLStandard == forcedGpuAPI) { + return NULL; + } + return SkNEW(SkDebugGLContext); + } +private: + SkDebugGLContext(); +}; + +#endif |