Greg Daniel | b76a72a | 2017-07-13 15:07:54 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 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 MtlTestContext_h |
| 9 | #define MtlTestContext_h |
| 10 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "tools/gpu/TestContext.h" |
Greg Daniel | b76a72a | 2017-07-13 15:07:54 -0400 | [diff] [blame] | 12 | |
| 13 | #ifdef SK_METAL |
| 14 | |
| 15 | namespace sk_gpu_test { |
Jim Van Verth | a3407ab | 2019-03-15 15:22:39 -0400 | [diff] [blame] | 16 | class MtlTestContext : public TestContext { |
| 17 | public: |
| 18 | GrBackendApi backend() override { return GrBackendApi::kMetal; } |
| 19 | |
| 20 | protected: |
| 21 | MtlTestContext() {} |
| 22 | |
| 23 | private: |
| 24 | typedef TestContext INHERITED; |
| 25 | }; |
| 26 | |
| 27 | /** |
| 28 | * Creates Metal context object bound to the native Metal library. |
| 29 | */ |
| 30 | MtlTestContext* CreatePlatformMtlTestContext(MtlTestContext*); |
| 31 | |
Greg Daniel | b76a72a | 2017-07-13 15:07:54 -0400 | [diff] [blame] | 32 | } // namespace sk_gpu_test |
| 33 | |
| 34 | #endif |
| 35 | |
Greg Daniel | b76a72a | 2017-07-13 15:07:54 -0400 | [diff] [blame] | 36 | #endif /* MtlTestContext_h */ |