diff options
author | csmartdalton <csmartdalton@google.com> | 2016-10-04 11:08:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-04 11:08:45 -0700 |
commit | 421a3c1cc1b227084c7c84618d0b6a6804faabef (patch) | |
tree | 121df15df779adc93866c323571c3a02ee349429 /tools/gpu/vk/VkTestContext.cpp | |
parent | d36baa7a4a5ae3cc94cc4a45379f55658f80c0a6 (diff) |
Move GPU fences into sk_gpu_test
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2383383002
Review-Url: https://codereview.chromium.org/2383383002
Diffstat (limited to 'tools/gpu/vk/VkTestContext.cpp')
-rw-r--r-- | tools/gpu/vk/VkTestContext.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/gpu/vk/VkTestContext.cpp b/tools/gpu/vk/VkTestContext.cpp index 02bda2fa31..c1a2f8ab56 100644 --- a/tools/gpu/vk/VkTestContext.cpp +++ b/tools/gpu/vk/VkTestContext.cpp @@ -15,11 +15,11 @@ namespace { /** - * Implements SkGpuFenceSync for Vulkan. It creates a single command buffer with - * USAGE_SIMULTANEOUS with no content . On every insertFence request it submits - * the command buffer with a new fence. + * Implements sk_gpu_test::FenceSync for Vulkan. It creates a single command + * buffer with USAGE_SIMULTANEOUS with no content . On every insertFence request + * it submits the command buffer with a new fence. */ -class VkFenceSync : public SkGpuFenceSync { +class VkFenceSync : public sk_gpu_test::FenceSync { public: VkFenceSync(sk_sp<const GrVkInterface> vk, VkDevice device, VkQueue queue, uint32_t queueFamilyIndex) @@ -58,7 +58,7 @@ public: GR_VK_CALL(fVk, DestroyCommandPool(fDevice, fCommandPool, nullptr)); } - SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const override { + sk_gpu_test::PlatformFence SK_WARN_UNUSED_RESULT insertFence() const override { VkFence fence; VkFenceCreateInfo info; info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; @@ -77,17 +77,17 @@ public: submitInfo.pSignalSemaphores = nullptr; GR_VK_CALL_ERRCHECK(fVk, QueueSubmit(fQueue, 1, &submitInfo, fence)); SkDEBUGCODE(++fUnfinishedSyncs;) - return reinterpret_cast<SkPlatformGpuFence>(fence); + return reinterpret_cast<sk_gpu_test::PlatformFence>(fence); } - bool waitFence(SkPlatformGpuFence opaqueFence) const override { + bool waitFence(sk_gpu_test::PlatformFence opaqueFence) const override { VkFence fence = reinterpret_cast<VkFence>(opaqueFence); static constexpr uint64_t kForever = ~((uint64_t)0); auto result = GR_VK_CALL(fVk, WaitForFences(fDevice, 1, &fence, true, kForever)); return result != VK_TIMEOUT; } - void deleteFence(SkPlatformGpuFence opaqueFence) const override { + void deleteFence(sk_gpu_test::PlatformFence opaqueFence) const override { VkFence fence = reinterpret_cast<VkFence>(opaqueFence); GR_VK_CALL(fVk, DestroyFence(fDevice, fence, nullptr)); SkDEBUGCODE(--fUnfinishedSyncs;) @@ -100,7 +100,7 @@ private: VkCommandPool fCommandPool; VkCommandBuffer fCommandBuffer; SkDEBUGCODE(mutable int fUnfinishedSyncs;) - typedef SkGpuFenceSync INHERITED; + typedef sk_gpu_test::FenceSync INHERITED; }; // TODO: Implement swap buffers and finish @@ -141,7 +141,7 @@ private: typedef sk_gpu_test::VkTestContext INHERITED; }; -} +} // anonymous namespace namespace sk_gpu_test { VkTestContext* CreatePlatformVkTestContext() { return VkTestContextImpl::Create(); } |