Bug 1701957 [wpt PR 28298] - Incorrect reference for hsl() test, a=testonly
[gecko.git] / dom / webgpu / CommandBuffer.h
blob36e7e2aa6fb3bf7e38e5632f4566f2eec67af569
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GPU_CommandBuffer_H_
7 #define GPU_CommandBuffer_H_
9 #include "mozilla/WeakPtr.h"
10 #include "mozilla/webgpu/WebGPUTypes.h"
11 #include "nsWrapperCache.h"
12 #include "ObjectModel.h"
14 namespace mozilla {
15 namespace dom {
16 class HTMLCanvasElement;
17 } // namespace dom
18 namespace webgpu {
20 class Device;
22 class CommandBuffer final : public ObjectBase, public ChildOf<Device> {
23 public:
24 GPU_DECL_CYCLE_COLLECTION(CommandBuffer)
25 GPU_DECL_JS_WRAP(CommandBuffer)
27 CommandBuffer(Device* const aParent, RawId aId,
28 const WeakPtr<dom::HTMLCanvasElement>& aTargetCanvasElement);
30 Maybe<RawId> Commit();
32 private:
33 CommandBuffer() = delete;
34 ~CommandBuffer();
35 void Cleanup();
37 const RawId mId;
38 const WeakPtr<dom::HTMLCanvasElement> mTargetCanvasElement;
41 } // namespace webgpu
42 } // namespace mozilla
44 #endif // GPU_CommandBuffer_H_