Chromium Code Reviews| Index: tools/gpu/vk/VkTestContext.cpp |
| diff --git a/tools/gpu/vk/VkTestContext.cpp b/tools/gpu/vk/VkTestContext.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..617c5c53efcaae4b70a9b091182c82e6a8ece7a2 |
| --- /dev/null |
| +++ b/tools/gpu/vk/VkTestContext.cpp |
| @@ -0,0 +1,39 @@ |
| +/* |
| + * Copyright 2016 Google Inc. |
| + * |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#include "VkTestContext.h" |
| + |
| +#ifdef SK_VULKAN |
| + |
| +namespace { |
| +// TODO: Implement fence syncs and swap buffers |
| +class VkTestContextImpl : public sk_gpu_test::VkTestContext { |
| +public: |
| + VkTestContextImpl() : VkTestContext(sk_sp<const GrVkBackendContext>(GrVkBackendContext::Create())) {} |
|
egdaniel
2016/05/11 15:39:30
100 chars
bsalomon
2016/05/11 15:52:49
Done.
|
| + |
| + ~VkTestContextImpl() override { this->teardown(); } |
| + |
| + void testAbandon() override {} |
| + |
| +protected: |
| + void teardown() override { fVk.reset(nullptr); } |
| + |
| +private: |
| + void onPlatformMakeCurrent() const override {} |
| + void onPlatformSwapBuffers() const override {} |
| + |
| + typedef sk_gpu_test::VkTestContext INHERITED; |
| +}; |
| +} |
| + |
| +namespace sk_gpu_test { |
| +VkTestContext* CreatePlatformVkTestContext() { |
| + return new VkTestContextImpl; |
| +} |
| +} // namespace sk_gpu_test |
| + |
| +#endif |