Bug 1857841 - pt 3. Add a new page kind named "fresh" r=glandium
[gecko.git] / dom / webgpu / RenderPipeline.h
blob859259da27f1f083775b65bc749bd456811594ca
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_RenderPipeline_H_
7 #define GPU_RenderPipeline_H_
9 #include "nsWrapperCache.h"
10 #include "ObjectModel.h"
11 #include "mozilla/webgpu/WebGPUTypes.h"
12 #include "nsTArray.h"
14 namespace mozilla::webgpu {
16 class BindGroupLayout;
17 class Device;
19 class RenderPipeline final : public ObjectBase, public ChildOf<Device> {
20 const RawId mImplicitPipelineLayoutId;
21 const nsTArray<RawId> mImplicitBindGroupLayoutIds;
23 public:
24 GPU_DECL_CYCLE_COLLECTION(RenderPipeline)
25 GPU_DECL_JS_WRAP(RenderPipeline)
27 const RawId mId;
29 RenderPipeline(Device* const aParent, RawId aId,
30 RawId aImplicitPipelineLayoutId,
31 nsTArray<RawId>&& aImplicitBindGroupLayoutIds);
32 already_AddRefed<BindGroupLayout> GetBindGroupLayout(uint32_t index) const;
34 private:
35 virtual ~RenderPipeline();
36 void Cleanup();
39 } // namespace mozilla::webgpu
41 #endif // GPU_RenderPipeline_H_