Flutter Engine
The Flutter Engine
MtlTestContext.h
Go to the documentation of this file.
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
12
13#ifdef SK_METAL
14
16
17namespace sk_gpu_test {
18class MtlTestContext : public TestContext {
19public:
20 GrBackendApi backend() override { return GrBackendApi::kMetal; }
21
22 const GrMtlBackendContext& getMtlBackendContext() const {
23 return fMtl;
24 }
25
26protected:
27 MtlTestContext(const GrMtlBackendContext& mtl)
28 : fMtl(mtl) {}
29
31
32private:
33 using INHERITED = TestContext;
34};
35
36/**
37 * Creates Metal context object bound to the native Metal library.
38 */
39MtlTestContext* CreatePlatformMtlTestContext(MtlTestContext*);
40
41} // namespace sk_gpu_test
42
43#endif
44
45#endif /* MtlTestContext_h */
const char * backend
GrBackendApi
Definition: GrTypes.h:95
#define INHERITED(method,...)
Definition: SkRecorder.cpp:128
MtlTestContext * CreatePlatformMtlTestContext(MtlTestContext *sharedContext)