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 11 #include "tools/gpu/TestContext.h" 12 13 #ifdef SK_METAL 14 15 namespace sk_gpu_test { 16 class MtlTestContext : public TestContext { 17 public: backend()18 GrBackendApi backend() override { return GrBackendApi::kMetal; } 19 20 protected: MtlTestContext()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 32 } // namespace sk_gpu_test 33 34 #endif 35 36 #endif /* MtlTestContext_h */ 37