Chromium Code Reviews| 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() : VkTestContext(sk_sp<const GrVkBackendContext>(GrVkBack endContext::Create())) {} | |
|
egdaniel
2016/05/11 15:39:30
100 chars
bsalomon
2016/05/11 15:52:49
Done.
| |
| 17 | |
| 18 ~VkTestContextImpl() override { this->teardown(); } | |
| 19 | |
| 20 void testAbandon() override {} | |
| 21 | |
| 22 protected: | |
| 23 void teardown() override { fVk.reset(nullptr); } | |
| 24 | |
| 25 private: | |
| 26 void onPlatformMakeCurrent() const override {} | |
| 27 void onPlatformSwapBuffers() const override {} | |
| 28 | |
| 29 typedef sk_gpu_test::VkTestContext INHERITED; | |
| 30 }; | |
| 31 } | |
| 32 | |
| 33 namespace sk_gpu_test { | |
| 34 VkTestContext* CreatePlatformVkTestContext() { | |
| 35 return new VkTestContextImpl; | |
| 36 } | |
| 37 } // namespace sk_gpu_test | |
| 38 | |
| 39 #endif | |
| OLD | NEW |