tor-browser

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

GPUProcessImpl.h (1222B)


      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 #ifndef _include_gfx_ipc_GPUProcessImpl_h__
      7 #define _include_gfx_ipc_GPUProcessImpl_h__
      8 
      9 #include "mozilla/ipc/ProcessChild.h"
     10 #include "GPUParent.h"
     11 
     12 #if defined(XP_WIN)
     13 #  include "mozilla/mscom/ProcessRuntime.h"
     14 #endif
     15 
     16 namespace mozilla {
     17 namespace gfx {
     18 
     19 // This class owns the subprocess instance of a PGPU - which in this case,
     20 // is a GPUParent. It is instantiated as a singleton in XRE_InitChildProcess.
     21 class GPUProcessImpl final : public ipc::ProcessChild {
     22 public:
     23  using ipc::ProcessChild::ProcessChild;
     24  virtual ~GPUProcessImpl();
     25 
     26  bool Init(int aArgc, char* aArgv[]) override;
     27  void CleanUp() override;
     28 
     29 private:
     30  RefPtr<GPUParent> mGPU = new GPUParent;
     31 
     32 #if defined(XP_WIN)
     33  // This object initializes and configures COM.
     34  mozilla::mscom::ProcessRuntime mCOMRuntime;
     35 #endif
     36 };
     37 
     38 }  // namespace gfx
     39 }  // namespace mozilla
     40 
     41 #endif  // _include_gfx_ipc_GPUProcessImpl_h__