tor-browser

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

CompilationInfo.h (1070B)


      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_CompilationInfo_H_
      7 #define GPU_CompilationInfo_H_
      8 
      9 #include "CompilationMessage.h"
     10 #include "ObjectModel.h"
     11 #include "nsWrapperCache.h"
     12 
     13 namespace mozilla::webgpu {
     14 class ShaderModule;
     15 
     16 class CompilationInfo final : public nsWrapperCache, public ChildOf<Device> {
     17 public:
     18  GPU_DECL_CYCLE_COLLECTION(CompilationInfo)
     19  GPU_DECL_JS_WRAP(CompilationInfo)
     20 
     21  explicit CompilationInfo(Device* const aParent);
     22 
     23  void SetMessages(
     24      nsTArray<mozilla::webgpu::WebGPUCompilationMessage>& aMessages);
     25 
     26  void GetMessages(
     27      nsTArray<RefPtr<mozilla::webgpu::CompilationMessage>>& aMessages);
     28 
     29 private:
     30  virtual ~CompilationInfo();
     31 
     32  nsTArray<RefPtr<mozilla::webgpu::CompilationMessage>> mMessages;
     33 };
     34 
     35 }  // namespace mozilla::webgpu
     36 
     37 #endif  // GPU_CompilationInfo_H_