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

Side by Side Diff: tools/viewer/sk_app/VulkanWindowContext.cpp

Issue 2115993002: Add resource tracking output and command buffer recycling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments 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/GrVkSampler.h ('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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 if (VK_NULL_HANDLE != fSwapchain) { 403 if (VK_NULL_HANDLE != fSwapchain) {
404 fDestroySwapchainKHR(fBackendContext->fDevice, fSwapchain, nullptr); 404 fDestroySwapchainKHR(fBackendContext->fDevice, fSwapchain, nullptr);
405 fSwapchain = VK_NULL_HANDLE; 405 fSwapchain = VK_NULL_HANDLE;
406 } 406 }
407 407
408 if (VK_NULL_HANDLE != fSurface) { 408 if (VK_NULL_HANDLE != fSurface) {
409 fDestroySurfaceKHR(fBackendContext->fInstance, fSurface, nullptr); 409 fDestroySurfaceKHR(fBackendContext->fInstance, fSurface, nullptr);
410 fSurface = VK_NULL_HANDLE; 410 fSurface = VK_NULL_HANDLE;
411 } 411 }
412 412
413 fContext->abandonContext();
414 fContext->unref(); 413 fContext->unref();
415 414
416 fBackendContext.reset(nullptr); 415 fBackendContext.reset(nullptr);
417 } 416 }
418 417
419 VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer () { 418 VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer () {
420 SkASSERT(fBackbuffers); 419 SkASSERT(fBackbuffers);
421 420
422 ++fCurrentBackbufferIndex; 421 ++fCurrentBackbufferIndex;
423 if (fCurrentBackbufferIndex > fImageCount) { 422 if (fCurrentBackbufferIndex > fImageCount) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 &fSwapchain, // pSwapchains 595 &fSwapchain, // pSwapchains
597 &backbuffer->fImageIndex, // pImageIndices 596 &backbuffer->fImageIndex, // pImageIndices
598 NULL // pResults 597 NULL // pResults
599 }; 598 };
600 599
601 fQueuePresentKHR(fPresentQueue, &presentInfo); 600 fQueuePresentKHR(fPresentQueue, &presentInfo);
602 601
603 } 602 }
604 603
605 } //namespace sk_app 604 } //namespace sk_app
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkSampler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698