QuerySet.h (1134B)
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/. */ 5 6 #ifndef GPU_QuerySet_H_ 7 #define GPU_QuerySet_H_ 8 9 #include "ObjectModel.h" 10 #include "mozilla/webgpu/WebGPUTypes.h" 11 12 namespace mozilla { 13 14 namespace dom { 15 struct GPUQuerySetDescriptor; 16 enum class GPUQueryType : uint8_t; 17 } // namespace dom 18 19 namespace webgpu { 20 21 class Device; 22 23 class QuerySet final : public nsWrapperCache, 24 public ObjectBase, 25 public ChildOf<Device> { 26 public: 27 GPU_DECL_CYCLE_COLLECTION(QuerySet) 28 GPU_DECL_JS_WRAP(QuerySet) 29 30 QuerySet() = delete; 31 QuerySet(Device* const aParent, const dom::GPUQuerySetDescriptor& aDesc, 32 RawId aId); 33 34 void Destroy(); 35 36 dom::GPUQueryType Type() const; 37 uint32_t Count() const; 38 39 private: 40 virtual ~QuerySet(); 41 42 dom::GPUQueryType mType; 43 uint32_t mCount; 44 }; 45 46 } // namespace webgpu 47 48 } // namespace mozilla 49 50 #endif // GPU_QuerySet_H_