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

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

Issue 2123323002: Vulkan fixes for TesselatingPathRenderer test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix void* delete Created 4 years, 5 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/GrVkBuffer.cpp ('k') | src/gpu/vk/GrVkUniformBuffer.h » ('j') | 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 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 #include "GrVkResourceProvider.h" 8 #include "GrVkResourceProvider.h"
9 9
10 #include "GrTextureParams.h" 10 #include "GrTextureParams.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 void GrVkResourceProvider::recycleSecondaryCommandBuffer(GrVkSecondaryCommandBuf fer* cb) { 263 void GrVkResourceProvider::recycleSecondaryCommandBuffer(GrVkSecondaryCommandBuf fer* cb) {
264 cb->reset(fGpu); 264 cb->reset(fGpu);
265 fAvailableSecondaryCommandBuffers.push_back(cb); 265 fAvailableSecondaryCommandBuffers.push_back(cb);
266 } 266 }
267 267
268 void GrVkResourceProvider::destroyResources() { 268 void GrVkResourceProvider::destroyResources() {
269 // release our active command buffers 269 // release our active command buffers
270 for (int i = 0; i < fActiveCommandBuffers.count(); ++i) { 270 for (int i = 0; i < fActiveCommandBuffers.count(); ++i) {
271 SkASSERT(fActiveCommandBuffers[i]->finished(fGpu)); 271 SkASSERT(fActiveCommandBuffers[i]->finished(fGpu));
272 SkASSERT(fActiveCommandBuffers[i]->unique()); 272 SkASSERT(fActiveCommandBuffers[i]->unique());
273 fActiveCommandBuffers[i]->reset(fGpu);
273 fActiveCommandBuffers[i]->unref(fGpu); 274 fActiveCommandBuffers[i]->unref(fGpu);
274 } 275 }
275 fActiveCommandBuffers.reset(); 276 fActiveCommandBuffers.reset();
276 // release our available command buffers 277 // release our available command buffers
277 for (int i = 0; i < fAvailableCommandBuffers.count(); ++i) { 278 for (int i = 0; i < fAvailableCommandBuffers.count(); ++i) {
278 SkASSERT(fAvailableCommandBuffers[i]->finished(fGpu)); 279 SkASSERT(fAvailableCommandBuffers[i]->finished(fGpu));
279 SkASSERT(fAvailableCommandBuffers[i]->unique()); 280 SkASSERT(fAvailableCommandBuffers[i]->unique());
280 fAvailableCommandBuffers[i]->unref(fGpu); 281 fAvailableCommandBuffers[i]->unref(fGpu);
281 } 282 }
282 fAvailableCommandBuffers.reset(); 283 fAvailableCommandBuffers.reset();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 426 }
426 427
427 void GrVkResourceProvider::CompatibleRenderPassSet::abandonResources() { 428 void GrVkResourceProvider::CompatibleRenderPassSet::abandonResources() {
428 for (int i = 0; i < fRenderPasses.count(); ++i) { 429 for (int i = 0; i < fRenderPasses.count(); ++i) {
429 if (fRenderPasses[i]) { 430 if (fRenderPasses[i]) {
430 fRenderPasses[i]->unrefAndAbandon(); 431 fRenderPasses[i]->unrefAndAbandon();
431 fRenderPasses[i] = nullptr; 432 fRenderPasses[i] = nullptr;
432 } 433 }
433 } 434 }
434 } 435 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkBuffer.cpp ('k') | src/gpu/vk/GrVkUniformBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698