OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #include "VkTestContext.h" |
| 9 |
| 10 #ifdef SK_VULKAN |
| 11 |
| 12 namespace { |
| 13 // TODO: Implement fence syncs and swap buffers |
| 14 class VkTestContextImpl : public sk_gpu_test::VkTestContext { |
| 15 public: |
| 16 VkTestContextImpl() |
| 17 : VkTestContext(sk_sp<const GrVkBackendContext>(GrVkBackendContext::Crea
te())) {} |
| 18 |
| 19 ~VkTestContextImpl() override { this->teardown(); } |
| 20 |
| 21 void testAbandon() override {} |
| 22 |
| 23 protected: |
| 24 void teardown() override { fVk.reset(nullptr); } |
| 25 |
| 26 private: |
| 27 void onPlatformMakeCurrent() const override {} |
| 28 void onPlatformSwapBuffers() const override {} |
| 29 |
| 30 typedef sk_gpu_test::VkTestContext INHERITED; |
| 31 }; |
| 32 } |
| 33 |
| 34 namespace sk_gpu_test { |
| 35 VkTestContext* CreatePlatformVkTestContext() { |
| 36 return new VkTestContextImpl; |
| 37 } |
| 38 } // namespace sk_gpu_test |
| 39 |
| 40 #endif |
OLD | NEW |