OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |