| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 return new GrVkGpu(context, options, vkBackendContext); | 77 return new GrVkGpu(context, options, vkBackendContext); |
| 78 } | 78 } |
| 79 | 79 |
| 80 //////////////////////////////////////////////////////////////////////////////// | 80 //////////////////////////////////////////////////////////////////////////////// |
| 81 | 81 |
| 82 GrVkGpu::GrVkGpu(GrContext* context, const GrContextOptions& options, | 82 GrVkGpu::GrVkGpu(GrContext* context, const GrContextOptions& options, |
| 83 const GrVkBackendContext* backendCtx) | 83 const GrVkBackendContext* backendCtx) |
| 84 : INHERITED(context) | 84 : INHERITED(context) |
| 85 #ifdef ENABLE_VK_LAYERS |
| 85 , fVkInstance(backendCtx->fInstance) | 86 , fVkInstance(backendCtx->fInstance) |
| 87 #endif |
| 86 , fDevice(backendCtx->fDevice) | 88 , fDevice(backendCtx->fDevice) |
| 87 , fQueue(backendCtx->fQueue) | 89 , fQueue(backendCtx->fQueue) |
| 88 , fResourceProvider(this) { | 90 , fResourceProvider(this) { |
| 89 fBackendContext.reset(backendCtx); | 91 fBackendContext.reset(backendCtx); |
| 90 | 92 |
| 91 #ifdef ENABLE_VK_LAYERS | 93 #ifdef ENABLE_VK_LAYERS |
| 92 if (backendCtx->fExtensions & kEXT_debug_report_GrVkExtensionFlag) { | 94 if (backendCtx->fExtensions & kEXT_debug_report_GrVkExtensionFlag) { |
| 93 // Setup callback creation information | 95 // Setup callback creation information |
| 94 VkDebugReportCallbackCreateInfoEXT callbackCreateInfo; | 96 VkDebugReportCallbackCreateInfoEXT callbackCreateInfo; |
| 95 callbackCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EX
T; | 97 callbackCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EX
T; |
| (...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1704 aglSwapBuffers(aglGetCurrentContext()); | 1706 aglSwapBuffers(aglGetCurrentContext()); |
| 1705 int set_a_break_pt_here = 9; | 1707 int set_a_break_pt_here = 9; |
| 1706 aglSwapBuffers(aglGetCurrentContext()); | 1708 aglSwapBuffers(aglGetCurrentContext()); |
| 1707 #elif defined(SK_BUILD_FOR_WIN32) | 1709 #elif defined(SK_BUILD_FOR_WIN32) |
| 1708 SwapBuf(); | 1710 SwapBuf(); |
| 1709 int set_a_break_pt_here = 9; | 1711 int set_a_break_pt_here = 9; |
| 1710 SwapBuf(); | 1712 SwapBuf(); |
| 1711 #endif | 1713 #endif |
| 1712 #endif | 1714 #endif |
| 1713 } | 1715 } |
| OLD | NEW |