| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrVkGpu.h" | 8 #include "GrVkGpu.h" |
| 9 | 9 |
| 10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 #endif | 350 #endif |
| 351 } | 351 } |
| 352 | 352 |
| 353 GrVkGpu::~GrVkGpu() { | 353 GrVkGpu::~GrVkGpu() { |
| 354 shaderc_compiler_release(fCompiler); | 354 shaderc_compiler_release(fCompiler); |
| 355 fCurrentCmdBuffer->end(this); | 355 fCurrentCmdBuffer->end(this); |
| 356 fCurrentCmdBuffer->unref(this); | 356 fCurrentCmdBuffer->unref(this); |
| 357 | 357 |
| 358 // wait for all commands to finish | 358 // wait for all commands to finish |
| 359 fResourceProvider.checkCommandBuffers(); | 359 fResourceProvider.checkCommandBuffers(); |
| 360 VkResult res = VK_CALL(QueueWaitIdle(fQueue)); | 360 SkDEBUGCODE(VkResult res =) VK_CALL(QueueWaitIdle(fQueue)); |
| 361 // VK_ERROR_DEVICE_LOST is acceptable when tearing down (see 4.2.4 in spec) | 361 // VK_ERROR_DEVICE_LOST is acceptable when tearing down (see 4.2.4 in spec) |
| 362 SkASSERT(VK_SUCCESS == res || VK_ERROR_DEVICE_LOST == res); | 362 SkASSERT(VK_SUCCESS == res || VK_ERROR_DEVICE_LOST == res); |
| 363 | 363 |
| 364 // must call this just before we destroy the VkDevice | 364 // must call this just before we destroy the VkDevice |
| 365 fResourceProvider.destroyResources(); | 365 fResourceProvider.destroyResources(); |
| 366 | 366 |
| 367 #ifdef SK_DEBUG | 367 #ifdef SK_DEBUG |
| 368 VK_CALL(DestroyDebugReportCallbackEXT(fVkInstance, fCallback, nullptr)); | 368 VK_CALL(DestroyDebugReportCallbackEXT(fVkInstance, fCallback, nullptr)); |
| 369 #endif | 369 #endif |
| 370 | 370 |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1663 int set_a_break_pt_here = 9; | 1663 int set_a_break_pt_here = 9; |
| 1664 aglSwapBuffers(aglGetCurrentContext()); | 1664 aglSwapBuffers(aglGetCurrentContext()); |
| 1665 #elif defined(SK_BUILD_FOR_WIN32) | 1665 #elif defined(SK_BUILD_FOR_WIN32) |
| 1666 SwapBuf(); | 1666 SwapBuf(); |
| 1667 int set_a_break_pt_here = 9; | 1667 int set_a_break_pt_here = 9; |
| 1668 SwapBuf(); | 1668 SwapBuf(); |
| 1669 #endif | 1669 #endif |
| 1670 #endif | 1670 #endif |
| 1671 } | 1671 } |
| 1672 | 1672 |
| OLD | NEW |