| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 | 381 |
| 382 VulkanWindowContext::~VulkanWindowContext() { | 382 VulkanWindowContext::~VulkanWindowContext() { |
| 383 this->destroyContext(); | 383 this->destroyContext(); |
| 384 } | 384 } |
| 385 | 385 |
| 386 void VulkanWindowContext::destroyContext() { | 386 void VulkanWindowContext::destroyContext() { |
| 387 if (!fBackendContext.get()) { | 387 if (!fBackendContext.get()) { |
| 388 return; | 388 return; |
| 389 } | 389 } |
| 390 | 390 |
| 391 GR_VK_CALL(fBackendContext->fInterface, QueueWaitIdle(fPresentQueue)); |
| 391 GR_VK_CALL(fBackendContext->fInterface, DeviceWaitIdle(fBackendContext->fDev
ice)); | 392 GR_VK_CALL(fBackendContext->fInterface, DeviceWaitIdle(fBackendContext->fDev
ice)); |
| 392 | 393 |
| 393 this->destroyBuffers(); | 394 this->destroyBuffers(); |
| 394 | 395 |
| 395 if (VK_NULL_HANDLE != fCommandPool) { | 396 if (VK_NULL_HANDLE != fCommandPool) { |
| 396 GR_VK_CALL(fBackendContext->fInterface, DestroyCommandPool(fBackendConte
xt->fDevice, | 397 GR_VK_CALL(fBackendContext->fInterface, DestroyCommandPool(fBackendConte
xt->fDevice, |
| 397 fCommandPool,
nullptr)); | 398 fCommandPool,
nullptr)); |
| 398 fCommandPool = VK_NULL_HANDLE; | 399 fCommandPool = VK_NULL_HANDLE; |
| 399 } | 400 } |
| 400 | 401 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 &fSwapchain, // pSwapchains | 595 &fSwapchain, // pSwapchains |
| 595 &backbuffer->fImageIndex, // pImageIndices | 596 &backbuffer->fImageIndex, // pImageIndices |
| 596 NULL // pResults | 597 NULL // pResults |
| 597 }; | 598 }; |
| 598 | 599 |
| 599 fQueuePresentKHR(fPresentQueue, &presentInfo); | 600 fQueuePresentKHR(fPresentQueue, &presentInfo); |
| 600 | 601 |
| 601 } | 602 } |
| 602 | 603 |
| 603 } //namespace sk_app | 604 } //namespace sk_app |
| OLD | NEW |