| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrVkFramebuffer_DEFINED | 8 #ifndef GrVkFramebuffer_DEFINED |
| 9 #define GrVkFramebuffer_DEFINED | 9 #define GrVkFramebuffer_DEFINED |
| 10 | 10 |
| 11 #include "GrTypes.h" | 11 #include "GrTypes.h" |
| 12 | 12 |
| 13 #include "GrVkResource.h" | 13 #include "GrVkResource.h" |
| 14 | 14 |
| 15 #include "vulkan/vulkan.h" | 15 #include "vk/GrVkDefines.h" |
| 16 | 16 |
| 17 class GrVkGpu; | 17 class GrVkGpu; |
| 18 class GrVkImageView; | 18 class GrVkImageView; |
| 19 class GrVkRenderPass; | 19 class GrVkRenderPass; |
| 20 | 20 |
| 21 class GrVkFramebuffer : public GrVkResource { | 21 class GrVkFramebuffer : public GrVkResource { |
| 22 public: | 22 public: |
| 23 static GrVkFramebuffer* Create(GrVkGpu* gpu, | 23 static GrVkFramebuffer* Create(GrVkGpu* gpu, |
| 24 int width, int height, | 24 int width, int height, |
| 25 const GrVkRenderPass* renderPass, | 25 const GrVkRenderPass* renderPass, |
| 26 const GrVkImageView* colorAttachment, | 26 const GrVkImageView* colorAttachment, |
| 27 const GrVkImageView* resolveAttachment, | 27 const GrVkImageView* resolveAttachment, |
| 28 const GrVkImageView* stencilAttachment); | 28 const GrVkImageView* stencilAttachment); |
| 29 | 29 |
| 30 VkFramebuffer framebuffer() const { return fFramebuffer; } | 30 VkFramebuffer framebuffer() const { return fFramebuffer; } |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 GrVkFramebuffer(VkFramebuffer framebuffer) : INHERITED(), fFramebuffer(frame
buffer) {} | 33 GrVkFramebuffer(VkFramebuffer framebuffer) : INHERITED(), fFramebuffer(frame
buffer) {} |
| 34 | 34 |
| 35 GrVkFramebuffer(const GrVkFramebuffer&); | 35 GrVkFramebuffer(const GrVkFramebuffer&); |
| 36 GrVkFramebuffer& operator=(const GrVkFramebuffer&); | 36 GrVkFramebuffer& operator=(const GrVkFramebuffer&); |
| 37 | 37 |
| 38 void freeGPUData(const GrVkGpu* gpu) const override; | 38 void freeGPUData(const GrVkGpu* gpu) const override; |
| 39 | 39 |
| 40 VkFramebuffer fFramebuffer; | 40 VkFramebuffer fFramebuffer; |
| 41 | 41 |
| 42 typedef GrVkResource INHERITED; | 42 typedef GrVkResource INHERITED; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 #endif | 45 #endif |
| OLD | NEW |