2017-10-28 02:10:06 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2016-06-11 05:27:24 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef _include_gfx_ipc_GPUProcessImpl_h__
|
|
|
|
#define _include_gfx_ipc_GPUProcessImpl_h__
|
|
|
|
|
|
|
|
#include "mozilla/ipc/ProcessChild.h"
|
|
|
|
#include "GPUParent.h"
|
|
|
|
|
2016-08-13 22:25:26 +03:00
|
|
|
#if defined(XP_WIN)
|
2019-02-14 21:45:26 +03:00
|
|
|
# include "mozilla/mscom/MainThreadRuntime.h"
|
2016-08-13 22:25:26 +03:00
|
|
|
#endif
|
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
|
|
|
// This class owns the subprocess instance of a PGPU - which in this case,
|
|
|
|
// is a GPUParent. It is instantiated as a singleton in XRE_InitChildProcess.
|
|
|
|
class GPUProcessImpl final : public ipc::ProcessChild {
|
|
|
|
public:
|
|
|
|
explicit GPUProcessImpl(ProcessId aParentPid);
|
|
|
|
~GPUProcessImpl();
|
|
|
|
|
2017-02-05 08:52:38 +03:00
|
|
|
bool Init(int aArgc, char* aArgv[]) override;
|
2016-06-11 05:27:24 +03:00
|
|
|
void CleanUp() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(GPUProcessImpl);
|
2016-08-13 22:25:26 +03:00
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
GPUParent mGPU;
|
2016-08-13 22:25:26 +03:00
|
|
|
|
|
|
|
#if defined(XP_WIN)
|
|
|
|
// This object initializes and configures COM.
|
2019-02-14 21:45:26 +03:00
|
|
|
mozilla::mscom::MainThreadRuntime mCOMRuntime;
|
2016-08-13 22:25:26 +03:00
|
|
|
#endif
|
2016-06-11 05:27:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // _include_gfx_ipc_GPUProcessImpl_h__
|