aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/debug/SkDebugGLContext.h
diff options
context:
space:
mode:
authorGravatar djsollen <djsollen@google.com>2014-11-13 11:12:41 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-13 11:12:41 -0800
commite4545210c950f98d9fa20f51bc1be6c5591534bd (patch)
tree0485f434709c8c1ad9ffb43ea5a63e5c013fc71b /src/gpu/gl/debug/SkDebugGLContext.h
parent912c9ec6ee8e28724861f0ac2b746e970895f745 (diff)
Cleanup GrContextFactory and make it's subclasses private
Diffstat (limited to 'src/gpu/gl/debug/SkDebugGLContext.h')
-rw-r--r--src/gpu/gl/debug/SkDebugGLContext.h29
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