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