tor-browser

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

ShaderModule.h (1067B)


      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_ShaderModule_H_
      7 #define GPU_ShaderModule_H_
      8 
      9 #include "ObjectModel.h"
     10 #include "mozilla/webgpu/WebGPUTypes.h"
     11 #include "nsWrapperCache.h"
     12 
     13 namespace mozilla::webgpu {
     14 
     15 class CompilationInfo;
     16 class Device;
     17 
     18 class ShaderModule final : public nsWrapperCache,
     19                           public ObjectBase,
     20                           public ChildOf<Device> {
     21 public:
     22  GPU_DECL_CYCLE_COLLECTION(ShaderModule)
     23  GPU_DECL_JS_WRAP(ShaderModule)
     24 
     25  ShaderModule(Device* const aParent, RawId aId,
     26               const RefPtr<dom::Promise>& aCompilationInfo);
     27  already_AddRefed<dom::Promise> GetCompilationInfo(ErrorResult& aRv);
     28 
     29 private:
     30  virtual ~ShaderModule();
     31 
     32  RefPtr<dom::Promise> mCompilationInfo;
     33 };
     34 
     35 }  // namespace mozilla::webgpu
     36 
     37 #endif  // GPU_ShaderModule_H_