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_GPUParent_h__
|
|
|
|
#define _include_gfx_ipc_GPUParent_h__
|
|
|
|
|
2016-07-19 21:56:06 +03:00
|
|
|
#include "mozilla/RefPtr.h"
|
2016-06-11 05:27:24 +03:00
|
|
|
#include "mozilla/gfx/PGPUParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
2017-01-03 23:13:36 +03:00
|
|
|
|
|
|
|
class TimeStamp;
|
2017-05-30 22:06:14 +03:00
|
|
|
class ChildProfilerController;
|
2017-01-03 23:13:36 +03:00
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
namespace gfx {
|
|
|
|
|
2016-07-19 21:56:06 +03:00
|
|
|
class VsyncBridgeParent;
|
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
class GPUParent final : public PGPUParent {
|
|
|
|
public:
|
|
|
|
GPUParent();
|
|
|
|
~GPUParent();
|
|
|
|
|
2016-09-22 08:38:44 +03:00
|
|
|
static GPUParent* GetSingleton();
|
|
|
|
|
2018-09-15 02:25:38 +03:00
|
|
|
// Gets the name of the GPU process, in the format expected by about:memory.
|
|
|
|
// There must be a GPU process active, and the caller must be either in that
|
|
|
|
// process or the parent process.
|
|
|
|
static void GetGPUProcessName(nsACString& aStr);
|
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
bool Init(base::ProcessId aParentPid, const char* aParentBuildID,
|
2020-02-07 01:41:56 +03:00
|
|
|
MessageLoop* aIOLoop, UniquePtr<IPC::Channel> aChannel);
|
2016-11-06 22:01:52 +03:00
|
|
|
void NotifyDeviceReset();
|
2016-06-11 05:27:24 +03:00
|
|
|
|
2019-08-08 19:46:22 +03:00
|
|
|
already_AddRefed<PAPZInputBridgeParent> AllocPAPZInputBridgeParent(
|
|
|
|
const LayersId& aLayersId);
|
2018-03-16 23:28:19 +03:00
|
|
|
|
2019-05-26 17:31:27 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInit(nsTArray<GfxVarUpdate>&& vars,
|
2019-02-06 18:58:43 +03:00
|
|
|
const DevicePrefs& devicePrefs,
|
2020-08-08 00:31:53 +03:00
|
|
|
nsTArray<LayerTreeIdMapping>&& mappings,
|
|
|
|
nsTArray<GfxInfoFeatureStatus>&& features);
|
2017-06-14 18:39:59 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInitCompositorManager(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PCompositorManagerParent>&& aEndpoint);
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInitVsyncBridge(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PVsyncBridgeParent>&& aVsyncEndpoint);
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInitImageBridge(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PImageBridgeParent>&& aEndpoint);
|
2019-11-04 06:41:57 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInitVideoBridge(
|
|
|
|
Endpoint<PVideoBridgeParent>&& aEndpoint);
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInitVRManager(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PVRManagerParent>&& aEndpoint);
|
|
|
|
mozilla::ipc::IPCResult RecvInitVR(Endpoint<PVRGPUChild>&& aVRGPUChild);
|
2018-03-25 02:06:01 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInitUiCompositorController(
|
|
|
|
const LayersId& aRootLayerTreeId,
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PUiCompositorControllerParent>&& aEndpoint);
|
2017-05-30 22:06:14 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInitProfiler(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PProfilerChild>&& aEndpoint);
|
|
|
|
mozilla::ipc::IPCResult RecvUpdateVar(const GfxVarUpdate& pref);
|
2019-05-25 13:12:51 +03:00
|
|
|
mozilla::ipc::IPCResult RecvPreferenceUpdate(const Pref& pref);
|
2017-06-14 18:39:59 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNewContentCompositorManager(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PCompositorManagerParent>&& aEndpoint);
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNewContentImageBridge(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PImageBridgeParent>&& aEndpoint);
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNewContentVRManager(
|
2019-02-06 18:58:43 +03:00
|
|
|
Endpoint<PVRManagerParent>&& aEndpoint);
|
2019-06-11 05:01:34 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNewContentRemoteDecoderManager(
|
|
|
|
Endpoint<PRemoteDecoderManagerParent>&& aEndpoint);
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvGetDeviceStatus(GPUDeviceData* aOutStatus);
|
|
|
|
mozilla::ipc::IPCResult RecvSimulateDeviceReset(GPUDeviceData* aOutStatus);
|
2017-04-04 01:13:38 +03:00
|
|
|
mozilla::ipc::IPCResult RecvAddLayerTreeIdMapping(
|
2019-02-06 18:58:43 +03:00
|
|
|
const LayerTreeIdMapping& aMapping);
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRemoveLayerTreeIdMapping(
|
2019-02-06 18:58:43 +03:00
|
|
|
const LayerTreeIdMapping& aMapping);
|
|
|
|
mozilla::ipc::IPCResult RecvNotifyGpuObservers(const nsCString& aTopic);
|
2017-01-27 03:35:54 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRequestMemoryReport(
|
|
|
|
const uint32_t& generation, const bool& anonymize,
|
2019-03-01 00:20:40 +03:00
|
|
|
const bool& minimizeMemoryUsage,
|
2020-08-03 21:29:45 +03:00
|
|
|
const Maybe<ipc::FileDescriptor>& DMDFile,
|
|
|
|
const RequestMemoryReportResolver& aResolver);
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvShutdownVR();
|
2016-06-11 05:27:24 +03:00
|
|
|
|
2019-05-21 22:01:31 +03:00
|
|
|
mozilla::ipc::IPCResult RecvUpdatePerfStatsCollectionMask(
|
|
|
|
const uint64_t& aMask);
|
|
|
|
mozilla::ipc::IPCResult RecvCollectPerfStatsJSON(
|
|
|
|
CollectPerfStatsJSONResolver&& aResolver);
|
|
|
|
|
2019-10-14 18:26:47 +03:00
|
|
|
#if defined(MOZ_SANDBOX) && defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
|
|
|
|
mozilla::ipc::IPCResult RecvInitSandboxTesting(
|
|
|
|
Endpoint<PSandboxTestingChild>&& aEndpoint);
|
|
|
|
#endif
|
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
void ActorDestroy(ActorDestroyReason aWhy) override;
|
2016-07-19 21:56:06 +03:00
|
|
|
|
|
|
|
private:
|
2017-01-03 23:13:36 +03:00
|
|
|
const TimeStamp mLaunchTime;
|
2016-07-19 21:56:06 +03:00
|
|
|
RefPtr<VsyncBridgeParent> mVsyncBridge;
|
2017-05-30 22:06:14 +03:00
|
|
|
#ifdef MOZ_GECKO_PROFILER
|
|
|
|
RefPtr<ChildProfilerController> mProfilerController;
|
|
|
|
#endif
|
2016-06-11 05:27:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // _include_gfx_ipc_GPUParent_h__
|