Index: src/gpu/gl/mesa/SkMesaGLContext.h |
diff --git a/src/gpu/gl/mesa/SkMesaGLContext.h b/src/gpu/gl/mesa/SkMesaGLContext.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7f700b65367cd548d5cade6c191c8ac659f8a422 |
--- /dev/null |
+++ b/src/gpu/gl/mesa/SkMesaGLContext.h |
@@ -0,0 +1,44 @@ |
+/* |
+ * 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 SkMesaGLContext_DEFINED |
+#define SkMesaGLContext_DEFINED |
+ |
+#include "gl/SkGLContext.h" |
+ |
+#if SK_MESA |
+ |
+class SkMesaGLContext : public SkGLContext { |
+private: |
+ typedef intptr_t Context; |
+ |
+public: |
+ ~SkMesaGLContext() override; |
+ |
+ static SkMesaGLContext* Create() { |
+ SkMesaGLContext* ctx = new SkMesaGLContext; |
+ if (!ctx->isValid()) { |
+ delete ctx; |
+ return nullptr; |
+ } |
+ return ctx; |
+ } |
+ |
+private: |
+ SkMesaGLContext(); |
+ void destroyGLContext(); |
+ |
+ void onPlatformMakeCurrent() const override; |
+ void onPlatformSwapBuffers() const override; |
+ GrGLFuncPtr onPlatformGetProcAddress(const char*) const override; |
+ |
+ Context fContext; |
+ GrGLubyte *fImage; |
+}; |
+ |
+#endif |
+ |
+#endif |