aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-07-26 12:02:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-26 12:02:51 -0700
commitd1bdd1fcbd308afb9903f39d231742f5c951cf07 (patch)
tree786715537d870e3ff8bc3686ea40b83b62c43d6b /include
parent1ed2ae45f59c2864ea05838b4da2750b85472824 (diff)
Use Windowing system-specific WindowContext factories.
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;
};