Index: sky/shell/gpu/ganesh_context.h |
diff --git a/sky/shell/gpu/ganesh_context.h b/sky/shell/gpu/ganesh_context.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7feec0b1c7ef5abd171684816af0d37fbaa89e3a |
--- /dev/null |
+++ b/sky/shell/gpu/ganesh_context.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SKY_SHELL_GPU_GANESH_CONTEXT_H_ |
+#define SKY_SHELL_GPU_GANESH_CONTEXT_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
+#include "skia/ext/refptr.h" |
+#include "third_party/skia/include/gpu/GrContext.h" |
+#include "ui/gl/gl_context.h" |
+ |
+namespace sky { |
+namespace shell { |
+ |
+class GaneshContext { |
+ public: |
+ explicit GaneshContext(scoped_refptr<gfx::GLContext> gl_context); |
+ ~GaneshContext(); |
+ |
+ GrContext* gr() const { return gr_context_.get(); } |
eseidel
2015/02/01 08:31:34
i wouldn't know what this is reading it.
abarth-chromium
2015/02/01 08:34:17
GrContext is the top-level context object for Gane
|
+ |
+ private: |
+ scoped_refptr<gfx::GLContext> gl_context_; |
+ skia::RefPtr<GrContext> gr_context_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GaneshContext); |
+}; |
+ |
+} // namespace shell |
+} // namespace sky |
+ |
+#endif // SKY_SHELL_GPU_GANESH_CONTEXT_H_ |