aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-02-11 11:11:11 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-11 11:11:11 -0800
commitbb0502eec5c66ddd2f54330711010aabfa1c2176 (patch)
tree9391a830b277a798e041911de0390cd678371d1a /include
parent0ea80f43a1af05b8157a4ef387223bb5b0da35ed (diff)
Support multiple null GL contexts on a thread.
This has the side effect of requiring SkNullGLContext to use the null GL interface. It exposes SkNullGLContext and also removes null context support from SampleApp. Review URL: https://codereview.chromium.org/916733002
Diffstat (limited to 'include')
-rw-r--r--include/gpu/gl/SkNullGLContext.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/gpu/gl/SkNullGLContext.h b/include/gpu/gl/SkNullGLContext.h
new file mode 100644
index 0000000000..1715cfe597
--- /dev/null
+++ b/include/gpu/gl/SkNullGLContext.h
@@ -0,0 +1,29 @@
+
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkNullGLContext_DEFINED
+#define SkNullGLContext_DEFINED
+
+#include "gl/SkGLContext.h"
+
+class SK_API SkNullGLContext : public SkGLContext {
+public:
+ ~SkNullGLContext() SK_OVERRIDE;
+ void makeCurrent() const SK_OVERRIDE;
+ void swapBuffers() const SK_OVERRIDE {};
+
+ static SkNullGLContext* Create(GrGLStandard);
+
+ struct ContextState;
+
+private:
+ SkNullGLContext();
+
+ ContextState* fState;
+};
+
+#endif