tor-browser

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

GpuFenceMTLSharedEvent.h (1360B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef MOZILLA_GFX_GpuFenceMTLSharedEvent_H
      8 #define MOZILLA_GFX_GpuFenceMTLSharedEvent_H
      9 
     10 #include "mozilla/layers/GpuFence.h"
     11 #include "mozilla/UniquePtr.h"
     12 #include "mozilla/webgpu/ffi/wgpu.h"
     13 #include "mozilla/webgpu/WebGPUTypes.h"
     14 
     15 namespace mozilla {
     16 
     17 namespace webgpu {
     18 namespace ffi {
     19 struct WGPUMetalSharedEventHandle;
     20 }
     21 }  // namespace webgpu
     22 
     23 namespace layers {
     24 
     25 class GpuFenceMTLSharedEvent : public GpuFence {
     26 public:
     27  static RefPtr<GpuFenceMTLSharedEvent> Create(
     28      UniquePtr<webgpu::ffi::WGPUMetalSharedEventHandle>&& aSharedEventHandle,
     29      const uint64_t aFenceValue);
     30 
     31  bool HasCompleted() override;
     32 
     33 protected:
     34  GpuFenceMTLSharedEvent(
     35      UniquePtr<webgpu::ffi::WGPUMetalSharedEventHandle>&& aSharedEventHandle,
     36      const uint64_t aFenceValue);
     37  virtual ~GpuFenceMTLSharedEvent() = default;
     38 
     39  UniquePtr<webgpu::ffi::WGPUMetalSharedEventHandle> mSharedEventHandle;
     40  const uint64_t mFenceValue;
     41 };
     42 
     43 }  // namespace layers
     44 }  // namespace mozilla
     45 
     46 #endif /* MOZILLA_GFX_GpuFenceMTLSharedEvent_H */