OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 8 |
9 #ifndef GrVkRenderTarget_DEFINED | 9 #ifndef GrVkRenderTarget_DEFINED |
10 #define GrVkRenderTarget_DEFINED | 10 #define GrVkRenderTarget_DEFINED |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 bool canAttemptStencilAttachment() const override { | 57 bool canAttemptStencilAttachment() const override { |
58 return true; | 58 return true; |
59 } | 59 } |
60 | 60 |
61 GrBackendObject getRenderTargetHandle() const override; | 61 GrBackendObject getRenderTargetHandle() const override; |
62 | 62 |
63 // Returns the total number of attachments | 63 // Returns the total number of attachments |
64 void getAttachmentsDescriptor(GrVkRenderPass::AttachmentsDescriptor* desc, | 64 void getAttachmentsDescriptor(GrVkRenderPass::AttachmentsDescriptor* desc, |
65 GrVkRenderPass::AttachmentFlags* flags) const; | 65 GrVkRenderPass::AttachmentFlags* flags) const; |
66 | 66 |
67 void addResources(GrVkCommandBuffer& commandBuffer) const; | 67 void addResources(GrVkCommandBuffer& commandBuffer) const; |
68 | 68 |
69 protected: | 69 protected: |
70 enum Derived { kDerived }; | 70 enum Derived { kDerived }; |
71 | 71 |
72 GrVkRenderTarget(GrVkGpu* gpu, | 72 GrVkRenderTarget(GrVkGpu* gpu, |
73 const GrSurfaceDesc& desc, | 73 const GrSurfaceDesc& desc, |
74 GrGpuResource::LifeCycle, | 74 GrGpuResource::LifeCycle, |
75 const GrVkImage::Resource* imageResource, | 75 const GrVkImage::Resource* imageResource, |
76 const GrVkImage::Resource* msaaImageResource, | 76 const GrVkImage::Resource* msaaImageResource, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 void createFramebuffer(GrVkGpu* gpu); | 123 void createFramebuffer(GrVkGpu* gpu); |
124 | 124 |
125 void releaseInternalObjects(); | 125 void releaseInternalObjects(); |
126 void abandonInternalObjects(); | 126 void abandonInternalObjects(); |
127 | 127 |
128 const GrVkFramebuffer* fFramebuffer; | 128 const GrVkFramebuffer* fFramebuffer; |
129 const GrVkImageView* fColorAttachmentView; | 129 const GrVkImageView* fColorAttachmentView; |
130 const GrVkImage::Resource* fMSAAImageResource; | 130 const GrVkImage::Resource* fMSAAImageResource; |
131 const GrVkImageView* fResolveAttachmentView; | 131 const GrVkImageView* fResolveAttachmentView; |
132 int fColorValuesPerPixel; | 132 int fColorValuesPerPixel; |
133 | 133 |
134 // This is a cached pointer to a simple render pass. The render target shoul
d unref it | 134 // This is a cached pointer to a simple render pass. The render target shoul
d unref it |
135 // once it is done with it. | 135 // once it is done with it. |
136 const GrVkRenderPass* fCachedSimpleRenderPass; | 136 const GrVkRenderPass* fCachedSimpleRenderPass; |
137 }; | 137 }; |
138 | 138 |
139 #endif | 139 #endif |
OLD | NEW |