diff options
author | bsalomon <bsalomon@google.com> | 2016-07-26 12:02:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-26 12:02:51 -0700 |
commit | d1bdd1fcbd308afb9903f39d231742f5c951cf07 (patch) | |
tree | 786715537d870e3ff8bc3686ea40b83b62c43d6b /include | |
parent | 1ed2ae45f59c2864ea05838b4da2750b85472824 (diff) |
Use Windowing system-specific WindowContext factories.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2169543002
Review-Url: https://codereview.chromium.org/2169543002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/vk/GrVkBackendContext.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h index 25e73a449b..608df83f48 100644 --- a/include/gpu/vk/GrVkBackendContext.h +++ b/include/gpu/vk/GrVkBackendContext.h @@ -51,13 +51,14 @@ struct GrVkBackendContext : public SkRefCnt { uint32_t fFeatures; SkAutoTUnref<const GrVkInterface> fInterface; + using CanPresentFn = std::function<bool(VkInstance, VkPhysicalDevice, + uint32_t queueFamilyIndex)>; + // Helper function to create the default Vulkan objects needed by the GrVkGpu object // If presentQueueIndex is non-NULL, will try to set up presentQueue as part of device - // creation. canPresent() is a device-dependent function. + // creation using the platform-specific canPresent() function. static const GrVkBackendContext* Create(uint32_t* presentQueueIndex = nullptr, - bool(*canPresent)(VkInstance, VkPhysicalDevice, uint32_t queueIndex, - void* platformData) = nullptr, - void* platformData = nullptr); + CanPresentFn = CanPresentFn()); ~GrVkBackendContext() override; }; |