Index: src/gpu/vk/GrVkImageView.h |
diff --git a/src/gpu/vk/GrVkImageView.h b/src/gpu/vk/GrVkImageView.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..43e960454eee45acabffba50e9626513c3392bd8 |
--- /dev/null |
+++ b/src/gpu/vk/GrVkImageView.h |
@@ -0,0 +1,41 @@ |
+/* |
+* Copyright 2016 Google Inc. |
+* |
+* Use of this source code is governed by a BSD-style license that can be |
+* found in the LICENSE file. |
+*/ |
+ |
+#ifndef GrVkImageView_DEFINED |
+#define GrVkImageView_DEFINED |
+ |
+#include "GrTypes.h" |
+ |
+#include "GrVkResource.h" |
+ |
+#include "vulkan/vulkan.h" |
+ |
+class GrVkImageView : public GrVkResource { |
+public: |
+ enum Type { |
+ kColor_Type, |
+ kStencil_Type |
+ }; |
+ |
+ static const GrVkImageView* Create(GrVkGpu* gpu, VkImage image, VkFormat format, Type viewType); |
+ |
+ VkImageView imageView() const { return fImageView; } |
+ |
+private: |
+ GrVkImageView(VkImageView imageView) : INHERITED(), fImageView(imageView) {} |
+ |
+ GrVkImageView(const GrVkImageView&); |
+ GrVkImageView& operator=(const GrVkImageView&); |
+ |
+ void freeGPUData(const GrVkGpu* gpu) const override; |
+ |
+ VkImageView fImageView; |
+ |
+ typedef GrVkResource INHERITED; |
+}; |
+ |
+#endif |