aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/vk/VkTestUtils.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-06-28 16:47:48 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-28 17:20:27 +0000
commit0db3a8846a4d05d55c36b7fa95fa6fbc1a6639cd (patch)
tree1bf5b267f22fcc844b9a6e246921e2e217195e44 /tools/gpu/vk/VkTestUtils.h
parent8849c95710227b6442a3d4ce5c48f6f4e4127e93 (diff)
Reland "Make GrVkBackendContext no longer derive from SkRefCnt."
This reverts commit 059a9ab4bcd07a4bfdbfef333c27ef3d277e0e46. Reason for revert: Fix landed in Fuchsia Original change's description: > Revert "Make GrVkBackendContext no longer derive from SkRefCnt." > > This reverts commit 93ae2337732bf206e6ef4faecc6b30c3881e8359. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Make GrVkBackendContext no longer derive from SkRefCnt. > > > > Also moves the helper Create functions to VkTestUtils since no clients > > are using them anymore. > > > > Bug: skia: > > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799 > > Reviewed-on: https://skia-review.googlesource.com/135323 > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: skia: > Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c > Reviewed-on: https://skia-review.googlesource.com/137903 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526 Reviewed-on: https://skia-review.googlesource.com/138181 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tools/gpu/vk/VkTestUtils.h')
-rw-r--r--tools/gpu/vk/VkTestUtils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/gpu/vk/VkTestUtils.h b/tools/gpu/vk/VkTestUtils.h
index 9f34ef09c5..30471a78c0 100644
--- a/tools/gpu/vk/VkTestUtils.h
+++ b/tools/gpu/vk/VkTestUtils.h
@@ -13,9 +13,21 @@
#ifdef SK_VULKAN
#include "vk/GrVkDefines.h"
+#include "vk/GrVkInterface.h"
+
+struct GrVkBackendContext;
namespace sk_gpu_test {
bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*);
+
+ using CanPresentFn = std::function<bool(VkInstance, VkPhysicalDevice,
+ uint32_t queueFamilyIndex)>;
+
+ bool CreateVkBackendContext(const GrVkInterface::GetInstanceProc& getInstanceProc,
+ const GrVkInterface::GetDeviceProc& getDeviceProc,
+ GrVkBackendContext* ctx,
+ uint32_t* presentQueueIndexPtr = nullptr,
+ CanPresentFn canPresent = CanPresentFn());
}
#endif