aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gpu/vk/GrVkBackendContext.h9
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;
};