QuerySet.cpp (997B)
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 #include "QuerySet.h" 7 8 #include "mozilla/dom/WebGPUBinding.h" 9 10 namespace mozilla::webgpu { 11 12 GPU_IMPL_CYCLE_COLLECTION(QuerySet, mParent) 13 GPU_IMPL_JS_WRAP(QuerySet) 14 15 QuerySet::QuerySet(Device* const aParent, 16 const dom::GPUQuerySetDescriptor& aDesc, RawId aId) 17 : ObjectBase(aParent->GetChild(), aId, ffi::wgpu_client_drop_query_set), 18 ChildOf(aParent), 19 mType(aDesc.mType), 20 mCount(aDesc.mCount) {} 21 22 QuerySet::~QuerySet() = default; 23 24 void QuerySet::Destroy() { 25 // TODO: <https://bugzilla.mozilla.org/show_bug.cgi?id=1929168> 26 } 27 28 dom::GPUQueryType QuerySet::Type() const { return mType; } 29 30 uint32_t QuerySet::Count() const { return mCount; } 31 32 } // namespace mozilla::webgpu