Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: src/gpu/vk/GrVkRenderTarget.cpp

Issue 1755753002: Implement various vulkan stencil clears and fix various stenciling bugs. (Closed) Base URL: https://skia.googlesource.com/skia.git@stencilImage
Patch Set: Review Nits Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkRenderPass.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "GrVkRenderTarget.h" 8 #include "GrVkRenderTarget.h"
9 9
10 #include "GrRenderTargetPriv.h" 10 #include "GrRenderTargetPriv.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 SkASSERT(imageDesc.fUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT); 189 SkASSERT(imageDesc.fUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
190 190
191 const GrVkImage::Resource* imageResource = GrVkImage::CreateResource(gpu, im ageDesc); 191 const GrVkImage::Resource* imageResource = GrVkImage::CreateResource(gpu, im ageDesc);
192 if (!imageResource) { 192 if (!imageResource) {
193 return nullptr; 193 return nullptr;
194 } 194 }
195 195
196 GrVkRenderTarget* rt = GrVkRenderTarget::Create(gpu, desc, lifeCycle, imageR esource); 196 GrVkRenderTarget* rt = GrVkRenderTarget::Create(gpu, desc, lifeCycle, imageR esource);
197 // Create() will increment the refCount of the image resource if it succeeds 197 // Create() will increment the refCount of the image resource if it succeeds
198 imageResource->unref(gpu); 198 imageResource->unref(gpu);
199
200 return rt; 199 return rt;
201 } 200 }
202 201
203 GrVkRenderTarget* 202 GrVkRenderTarget*
204 GrVkRenderTarget::CreateWrappedRenderTarget(GrVkGpu* gpu, 203 GrVkRenderTarget::CreateWrappedRenderTarget(GrVkGpu* gpu,
205 const GrSurfaceDesc& desc, 204 const GrSurfaceDesc& desc,
206 GrGpuResource::LifeCycle lifeCycle, 205 GrGpuResource::LifeCycle lifeCycle,
207 const GrVkImage::Resource* imageReso urce) { 206 const GrVkImage::Resource* imageReso urce) {
208 SkASSERT(imageResource); 207 SkASSERT(imageResource);
209 208
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 381
383 return nullptr; 382 return nullptr;
384 } 383 }
385 384
386 385
387 GrVkGpu* GrVkRenderTarget::getVkGpu() const { 386 GrVkGpu* GrVkRenderTarget::getVkGpu() const {
388 SkASSERT(!this->wasDestroyed()); 387 SkASSERT(!this->wasDestroyed());
389 return static_cast<GrVkGpu*>(this->getGpu()); 388 return static_cast<GrVkGpu*>(this->getGpu());
390 } 389 }
391 390
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkRenderPass.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698