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 #ifndef VkTestContext_DEFINED |
| 9 #define VkTestContext_DEFINED |
| 10 |
| 11 #include "TestContext.h" |
| 12 #include "vk/GrVkBackendContext.h" |
| 13 |
| 14 #ifdef SK_VULKAN |
| 15 |
| 16 namespace sk_gpu_test { |
| 17 class VkTestContext : public TestContext { |
| 18 public: |
| 19 bool isValid() const override { return NULL != this->vk(); } |
| 20 |
| 21 const GrVkInterface* vk() const { return fVk->fInterface; }; |
| 22 |
| 23 protected: |
| 24 VkTestContext(sk_sp<const GrVkBackendContext> vk) : fVk(std::move(vk)) {}; |
| 25 |
| 26 sk_sp<const GrVkBackendContext> fVk; |
| 27 |
| 28 private: |
| 29 typedef TestContext INHERITED; |
| 30 }; |
| 31 |
| 32 /** |
| 33 * Creates Vk context object bound to the native Vk library. |
| 34 */ |
| 35 VkTestContext* CreatePlatformVkTestContext(); |
| 36 |
| 37 } // namespace sk_gpu_test |
| 38 |
| 39 #endif |
| 40 |
| 41 #endif |
OLD | NEW |