Index: include/gpu/vk/GrVkBackendContext.h |
diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h |
index 25e73a449ba175f30aa28c96e175aa6f227c8074..608df83f488b687cc9639902fd79f5e02dba1690 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; |
}; |