| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 SkDebugf("Vulkan perf warning [%s]: code: %d: %s\n", pLayerPrefix, messa
geCode, pMessage); | 56 SkDebugf("Vulkan perf warning [%s]: code: %d: %s\n", pLayerPrefix, messa
geCode, pMessage); |
| 57 } else { | 57 } else { |
| 58 SkDebugf("Vulkan info/debug [%s]: code: %d: %s\n", pLayerPrefix, message
Code, pMessage); | 58 SkDebugf("Vulkan info/debug [%s]: code: %d: %s\n", pLayerPrefix, message
Code, pMessage); |
| 59 } | 59 } |
| 60 return VK_FALSE; | 60 return VK_FALSE; |
| 61 } | 61 } |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 GrGpu* GrVkGpu::Create(GrBackendContext backendContext, const GrContextOptions&
options, | 64 GrGpu* GrVkGpu::Create(GrBackendContext backendContext, const GrContextOptions&
options, |
| 65 GrContext* context) { | 65 GrContext* context) { |
| 66 SkAutoTUnref<const GrVkBackendContext> vkBackendContext( | 66 const GrVkBackendContext* vkBackendContext = |
| 67 reinterpret_cast<const GrVkBackendContext
*>(backendContext)); | 67 reinterpret_cast<const GrVkBackendContext*>(backendContext); |
| 68 if (!vkBackendContext) { | 68 if (!vkBackendContext) { |
| 69 vkBackendContext.reset(GrVkBackendContext::Create()); | 69 vkBackendContext = GrVkBackendContext::Create(); |
| 70 if (!vkBackendContext) { | 70 if (!vkBackendContext) { |
| 71 return nullptr; | 71 return nullptr; |
| 72 } | 72 } |
| 73 } else { | 73 } else { |
| 74 vkBackendContext->ref(); | 74 vkBackendContext->ref(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 return new GrVkGpu(context, options, vkBackendContext); | 77 return new GrVkGpu(context, options, vkBackendContext); |
| 78 } | 78 } |
| 79 | 79 |
| (...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 aglSwapBuffers(aglGetCurrentContext()); | 1566 aglSwapBuffers(aglGetCurrentContext()); |
| 1567 int set_a_break_pt_here = 9; | 1567 int set_a_break_pt_here = 9; |
| 1568 aglSwapBuffers(aglGetCurrentContext()); | 1568 aglSwapBuffers(aglGetCurrentContext()); |
| 1569 #elif defined(SK_BUILD_FOR_WIN32) | 1569 #elif defined(SK_BUILD_FOR_WIN32) |
| 1570 SwapBuf(); | 1570 SwapBuf(); |
| 1571 int set_a_break_pt_here = 9; | 1571 int set_a_break_pt_here = 9; |
| 1572 SwapBuf(); | 1572 SwapBuf(); |
| 1573 #endif | 1573 #endif |
| 1574 #endif | 1574 #endif |
| 1575 } | 1575 } |
| OLD | NEW |