diff options
author | jvanverth <jvanverth@google.com> | 2016-05-23 13:13:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-23 13:13:36 -0700 |
commit | 1d1559620058365e0de25636f1bcf07fcc071c3d (patch) | |
tree | aa9cae557fade884de8c1a5359dc0624cd44a288 /include | |
parent | 50134ccafdc509d4d430d068d7e68e38473ffe0a (diff) |
Add Xlib support to viewer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1999213002
Review-Url: https://codereview.chromium.org/1999213002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/vk/GrVkBackendContext.h | 6 | ||||
-rw-r--r-- | include/gpu/vk/GrVkDefines.h | 17 |
2 files changed, 5 insertions, 18 deletions
diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h index d33466ca25..25e73a449b 100644 --- a/include/gpu/vk/GrVkBackendContext.h +++ b/include/gpu/vk/GrVkBackendContext.h @@ -25,7 +25,7 @@ enum GrVkExtensionFlags { kKHR_swapchain_GrVkExtensionFlag = 0x0008, kKHR_win32_surface_GrVkExtensionFlag = 0x0010, kKHR_android_surface_GrVkExtensionFlag = 0x0020, - kKHR_xlib_surface_GrVkExtensionFlag = 0x0040, + kKHR_xcb_surface_GrVkExtensionFlag = 0x0040, }; enum GrVkFeatureFlags { @@ -55,7 +55,9 @@ struct GrVkBackendContext : public SkRefCnt { // If presentQueueIndex is non-NULL, will try to set up presentQueue as part of device // creation. canPresent() is a device-dependent function. static const GrVkBackendContext* Create(uint32_t* presentQueueIndex = nullptr, - bool(*canPresent)(VkInstance, VkPhysicalDevice, uint32_t queueIndex) = nullptr); + bool(*canPresent)(VkInstance, VkPhysicalDevice, uint32_t queueIndex, + void* platformData) = nullptr, + void* platformData = nullptr); ~GrVkBackendContext() override; }; diff --git a/include/gpu/vk/GrVkDefines.h b/include/gpu/vk/GrVkDefines.h index 7f4b59dccf..9caf2d75e5 100644 --- a/include/gpu/vk/GrVkDefines.h +++ b/include/gpu/vk/GrVkDefines.h @@ -14,7 +14,7 @@ #elif defined(SK_BUILD_FOR_ANDROID) # define VK_USE_PLATFORM_ANDROID_KHR #elif defined(SK_BUILD_FOR_UNIX) -# define VK_USE_PLATFORM_XLIB_KHR +# define VK_USE_PLATFORM_XCB_KHR #endif #if defined(Bool) || defined(Status) || defined(True) || defined(False) @@ -23,19 +23,4 @@ #include <vulkan/vulkan.h> - -// Xlib.h may define these macros with common names (Grrr) -#ifdef Bool -# undef Bool -#endif -#ifdef Status -# undef Status -#endif -#ifdef True -# undef True -#endif -#ifdef False -# undef False -#endif - #endif |