Index: src/image/SkSurface_Gpu.h |
diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a02eb3e90402ee09a27107fdb6c0333749f9cd18 |
--- /dev/null |
+++ b/src/image/SkSurface_Gpu.h |
@@ -0,0 +1,42 @@ |
+/* |
+ * Copyright 2014 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef SkSurface_Gpu_DEFINED |
+#define SkSurface_Gpu_DEFINED |
+ |
+#include "SkSurface_Base.h" |
+ |
+#if SK_SUPPORT_GPU |
+ |
+class SkGpuDevice; |
+ |
+class SkSurface_Gpu : public SkSurface_Base { |
+public: |
+ SK_DECLARE_INST_COUNT(SkSurface_Gpu) |
+ |
+ SkSurface_Gpu(GrRenderTarget*, const SkSurfaceProps*, bool doClear); |
+ virtual ~SkSurface_Gpu(); |
+ |
+ virtual SkCanvas* onNewCanvas() SK_OVERRIDE; |
+ virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; |
+ virtual SkImage* onNewImageSnapshot() SK_OVERRIDE; |
+ virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, |
+ const SkPaint*) SK_OVERRIDE; |
+ virtual void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE; |
+ virtual void onDiscard() SK_OVERRIDE; |
+ |
+ SkGpuDevice* getDevice() { return fDevice; } |
+ |
+private: |
+ SkGpuDevice* fDevice; |
+ |
+ typedef SkSurface_Base INHERITED; |
+}; |
+ |
+#endif // SK_SUPPORT_GPU |
+ |
+#endif // SkSurface_Gpu_DEFINED |