Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GraphiteDawnTestContext.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
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 skiatest_graphite_DawnTestContext_DEFINED
9#define skiatest_graphite_DawnTestContext_DEFINED
10
12
14
15#include <optional>
16
17#include "webgpu/webgpu_cpp.h" // NO_G3_REWRITE
18#include "dawn/native/DawnNative.h"
19
20namespace skiatest::graphite {
21
23public:
24 ~DawnTestContext() override;
25
26 static std::unique_ptr<GraphiteTestContext> Make(wgpu::BackendType backend);
27
29
31
32 std::unique_ptr<skgpu::graphite::Context> makeContext(const TestOptions&) override;
33
37
38 void tick() override;
39
40protected:
42 : fBackendContext(backendContext) {}
43
45};
46
47} // namespace skiatest::graphite
48
49#endif // skiatest_graphite_DawnTestContext_DEFINED
skgpu::graphite::DawnBackendContext fBackendContext
static std::unique_ptr< GraphiteTestContext > Make(wgpu::BackendType backend)
DawnTestContext(const skgpu::graphite::DawnBackendContext &backendContext)
std::unique_ptr< skgpu::graphite::Context > makeContext(const TestOptions &) override
const skgpu::graphite::DawnBackendContext & getBackendContext() const
BackendApi
Definition GpuTypes.h:22