Flutter Engine
The Flutter Engine
DawnQueueManager.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 skgpu_graphite_DawnQueueManager_DEFINED
9#define skgpu_graphite_DawnQueueManager_DEFINED
10
12
13#include "webgpu/webgpu_cpp.h" // NO_G3_REWRITE
14
15namespace skgpu::graphite {
16
17class DawnSharedContext;
18class SharedContext;
19
21public:
22 DawnQueueManager(wgpu::Queue, const SharedContext*);
23 ~DawnQueueManager() override {}
24
25 const wgpu::Queue& dawnQueue() const { return fQueue; }
26
27 void tick() const override;
28
29private:
30 const DawnSharedContext* dawnSharedContext() const;
31
32 std::unique_ptr<CommandBuffer> getNewCommandBuffer(ResourceProvider*) override;
33 OutstandingSubmission onSubmitToGpu() override;
34
35#if defined(GRAPHITE_TEST_UTILS)
36 void startCapture() override;
37 void stopCapture() override;
38#endif
39
40 wgpu::Queue fQueue;
41};
42
43} // namespace skgpu::graphite
44
45#endif // skgpu_graphite_DawnQueueManager_DEFINED
const wgpu::Queue & dawnQueue() const
DawnQueueManager(wgpu::Queue, const SharedContext *)
std::unique_ptr< GpuWorkSubmission > OutstandingSubmission
Definition: QueueManager.h:65