tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

BindGroup.cpp (1024B)


      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 "BindGroup.h"
      7 
      8 #include "Device.h"
      9 #include "ExternalTexture.h"
     10 #include "ipc/WebGPUChild.h"
     11 #include "mozilla/dom/WebGPUBinding.h"
     12 
     13 namespace mozilla::webgpu {
     14 
     15 GPU_IMPL_CYCLE_COLLECTION(BindGroup, mParent, mExternalTextures)
     16 GPU_IMPL_JS_WRAP(BindGroup)
     17 
     18 BindGroup::BindGroup(Device* const aParent, RawId aId,
     19                     CanvasContextArray&& aCanvasContexts,
     20                     nsTArray<RefPtr<ExternalTexture>>&& aExternalTextures)
     21    : ObjectBase(aParent->GetChild(), aId, ffi::wgpu_client_drop_bind_group),
     22      ChildOf(aParent),
     23      mUsedCanvasContexts(std::move(aCanvasContexts)),
     24      mExternalTextures(std::move(aExternalTextures)) {}
     25 
     26 BindGroup::~BindGroup() = default;
     27 
     28 }  // namespace mozilla::webgpu