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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const GrVkResource* stencilImageResource() const; | 53 const GrVkResource* stencilImageResource() const; |
54 const GrVkImageView* stencilAttachmentView() const; | 54 const GrVkImageView* stencilAttachmentView() const; |
55 | 55 |
56 const GrVkRenderPass* simpleRenderPass() const { return fCachedSimpleRenderP
ass; } | 56 const GrVkRenderPass* simpleRenderPass() const { return fCachedSimpleRenderP
ass; } |
57 GrVkResourceProvider::CompatibleRPHandle compatibleRenderPassHandle() const
{ | 57 GrVkResourceProvider::CompatibleRPHandle compatibleRenderPassHandle() const
{ |
58 return fCompatibleRPHandle; | 58 return fCompatibleRPHandle; |
59 } | 59 } |
60 | 60 |
61 // override of GrRenderTarget | 61 // override of GrRenderTarget |
62 ResolveType getResolveType() const override { | 62 ResolveType getResolveType() const override { |
63 return kCanResolve_ResolveType; | 63 if (this->numColorSamples() > 1) { |
| 64 return kCanResolve_ResolveType; |
| 65 } |
| 66 return kAutoResolves_ResolveType; |
64 } | 67 } |
65 | 68 |
66 bool canAttemptStencilAttachment() const override { | 69 bool canAttemptStencilAttachment() const override { |
67 return true; | 70 return true; |
68 } | 71 } |
69 | 72 |
70 GrBackendObject getRenderTargetHandle() const override; | 73 GrBackendObject getRenderTargetHandle() const override; |
71 | 74 |
72 void getAttachmentsDescriptor(GrVkRenderPass::AttachmentsDescriptor* desc, | 75 void getAttachmentsDescriptor(GrVkRenderPass::AttachmentsDescriptor* desc, |
73 GrVkRenderPass::AttachmentFlags* flags) const; | 76 GrVkRenderPass::AttachmentFlags* flags) const; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 int fColorValuesPerPixel; | 141 int fColorValuesPerPixel; |
139 | 142 |
140 // This is a cached pointer to a simple render pass. The render target shoul
d unref it | 143 // This is a cached pointer to a simple render pass. The render target shoul
d unref it |
141 // once it is done with it. | 144 // once it is done with it. |
142 const GrVkRenderPass* fCachedSimpleRenderPass; | 145 const GrVkRenderPass* fCachedSimpleRenderPass; |
143 // This is a handle to be used to quickly get compatible GrVkRenderPasses fo
r this render target | 146 // This is a handle to be used to quickly get compatible GrVkRenderPasses fo
r this render target |
144 GrVkResourceProvider::CompatibleRPHandle fCompatibleRPHandle; | 147 GrVkResourceProvider::CompatibleRPHandle fCompatibleRPHandle; |
145 }; | 148 }; |
146 | 149 |
147 #endif | 150 #endif |
OLD | NEW |