blob: dbda09d6c0946e1a701206c9e31248787b527c24 [file] [log] [blame]
Greg Danielb76a72a2017-07-13 15:07:54 -04001/*
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 Kleinc0bd9f92019-04-23 12:05:21 -050011#include "tools/gpu/TestContext.h"
Greg Danielb76a72a2017-07-13 15:07:54 -040012
13#ifdef SK_METAL
14
15namespace sk_gpu_test {
Jim Van Vertha3407ab2019-03-15 15:22:39 -040016class MtlTestContext : public TestContext {
17public:
18 GrBackendApi backend() override { return GrBackendApi::kMetal; }
19
20protected:
21 MtlTestContext() {}
22
23private:
24 typedef TestContext INHERITED;
25};
26
27/**
28 * Creates Metal context object bound to the native Metal library.
29 */
30MtlTestContext* CreatePlatformMtlTestContext(MtlTestContext*);
31
Greg Danielb76a72a2017-07-13 15:07:54 -040032} // namespace sk_gpu_test
33
34#endif
35
Greg Danielb76a72a2017-07-13 15:07:54 -040036#endif /* MtlTestContext_h */