| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 #ifndef GrVkBackendContext_DEFINED | 8 #ifndef GrVkBackendContext_DEFINED |
| 9 #define GrVkBackendContext_DEFINED | 9 #define GrVkBackendContext_DEFINED |
| 10 | 10 |
| 11 #include "SkRefCnt.h" | 11 #include "SkRefCnt.h" |
| 12 | 12 |
| 13 #include "vk/GrVkDefines.h" | 13 #include "vk/GrVkDefines.h" |
| 14 | 14 |
| 15 #ifdef SK_DEBUG | |
| 16 #define ENABLE_VK_LAYERS | |
| 17 #endif | |
| 18 | |
| 19 struct GrVkInterface; | 15 struct GrVkInterface; |
| 20 | 16 |
| 21 enum GrVkExtensionFlags { | 17 enum GrVkExtensionFlags { |
| 22 kEXT_debug_report_GrVkExtensionFlag = 0x0001, | 18 kEXT_debug_report_GrVkExtensionFlag = 0x0001, |
| 23 kNV_glsl_shader_GrVkExtensionFlag = 0x0002, | 19 kNV_glsl_shader_GrVkExtensionFlag = 0x0002, |
| 24 kKHR_surface_GrVkExtensionFlag = 0x0004, | 20 kKHR_surface_GrVkExtensionFlag = 0x0004, |
| 25 kKHR_swapchain_GrVkExtensionFlag = 0x0008, | 21 kKHR_swapchain_GrVkExtensionFlag = 0x0008, |
| 26 kKHR_win32_surface_GrVkExtensionFlag = 0x0010, | 22 kKHR_win32_surface_GrVkExtensionFlag = 0x0010, |
| 27 kKHR_android_surface_GrVkExtensionFlag = 0x0020, | 23 kKHR_android_surface_GrVkExtensionFlag = 0x0020, |
| 28 kKHR_xcb_surface_GrVkExtensionFlag = 0x0040, | 24 kKHR_xcb_surface_GrVkExtensionFlag = 0x0040, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 57 // Helper function to create the default Vulkan objects needed by the GrVkGp
u object | 53 // Helper function to create the default Vulkan objects needed by the GrVkGp
u object |
| 58 // If presentQueueIndex is non-NULL, will try to set up presentQueue as part
of device | 54 // If presentQueueIndex is non-NULL, will try to set up presentQueue as part
of device |
| 59 // creation using the platform-specific canPresent() function. | 55 // creation using the platform-specific canPresent() function. |
| 60 static const GrVkBackendContext* Create(uint32_t* presentQueueIndex = nullpt
r, | 56 static const GrVkBackendContext* Create(uint32_t* presentQueueIndex = nullpt
r, |
| 61 CanPresentFn = CanPresentFn()); | 57 CanPresentFn = CanPresentFn()); |
| 62 | 58 |
| 63 ~GrVkBackendContext() override; | 59 ~GrVkBackendContext() override; |
| 64 }; | 60 }; |
| 65 | 61 |
| 66 #endif | 62 #endif |
| OLD | NEW |