2016-06-11 02:27:24 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=99: */
|
|
|
|
/* 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 18:56:06 +00:00
|
|
|
#include "mozilla/RefPtr.h"
|
2016-06-11 02:27:24 +00:00
|
|
|
#include "mozilla/gfx/PGPUParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
2016-07-19 18:56:06 +00:00
|
|
|
class VsyncBridgeParent;
|
|
|
|
|
2016-06-11 02:27:24 +00:00
|
|
|
class GPUParent final : public PGPUParent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GPUParent();
|
|
|
|
~GPUParent();
|
|
|
|
|
2016-09-22 05:38:44 +00:00
|
|
|
static GPUParent* GetSingleton();
|
|
|
|
|
2016-06-11 02:27:24 +00:00
|
|
|
bool Init(base::ProcessId aParentPid,
|
|
|
|
MessageLoop* aIOLoop,
|
|
|
|
IPC::Channel* aChannel);
|
|
|
|
|
2016-08-04 18:33:42 +00:00
|
|
|
bool RecvInit(nsTArray<GfxPrefSetting>&& prefs,
|
2016-08-21 03:59:10 +00:00
|
|
|
nsTArray<GfxVarUpdate>&& vars,
|
|
|
|
const DevicePrefs& devicePrefs) override;
|
2016-07-19 18:56:06 +00:00
|
|
|
bool RecvInitVsyncBridge(Endpoint<PVsyncBridgeParent>&& aVsyncEndpoint) override;
|
2016-07-20 07:19:27 +00:00
|
|
|
bool RecvInitImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override;
|
2016-07-21 07:14:59 +00:00
|
|
|
bool RecvInitVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override;
|
2016-06-27 06:33:20 +00:00
|
|
|
bool RecvUpdatePref(const GfxPrefSetting& pref) override;
|
2016-08-04 18:33:42 +00:00
|
|
|
bool RecvUpdateVar(const GfxVarUpdate& pref) override;
|
2016-07-18 04:24:28 +00:00
|
|
|
bool RecvNewWidgetCompositor(
|
|
|
|
Endpoint<PCompositorBridgeParent>&& aEndpoint,
|
|
|
|
const CSSToLayoutDeviceScale& aScale,
|
2016-07-26 08:57:11 +00:00
|
|
|
const TimeDuration& aVsyncRate,
|
2016-07-18 04:24:28 +00:00
|
|
|
const bool& aUseExternalSurface,
|
|
|
|
const IntSize& aSurfaceSize) override;
|
2016-07-18 04:24:28 +00:00
|
|
|
bool RecvNewContentCompositorBridge(Endpoint<PCompositorBridgeParent>&& aEndpoint) override;
|
2016-07-20 07:19:27 +00:00
|
|
|
bool RecvNewContentImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override;
|
2016-07-21 07:14:59 +00:00
|
|
|
bool RecvNewContentVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override;
|
2016-09-21 09:25:33 +00:00
|
|
|
bool RecvNewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent>&& aEndpoint) override;
|
2016-08-17 16:11:00 +00:00
|
|
|
bool RecvDeallocateLayerTreeId(const uint64_t& aLayersId) override;
|
2016-08-21 03:59:11 +00:00
|
|
|
bool RecvGetDeviceStatus(GPUDeviceData* aOutStatus) override;
|
2016-08-16 20:59:13 +00:00
|
|
|
bool RecvAddLayerTreeIdMapping(const uint64_t& aLayersId, const ProcessId& aOwnerId) override;
|
2016-06-11 02:27:24 +00:00
|
|
|
|
|
|
|
void ActorDestroy(ActorDestroyReason aWhy) override;
|
2016-07-19 18:56:06 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
RefPtr<VsyncBridgeParent> mVsyncBridge;
|
2016-06-11 02:27:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // _include_gfx_ipc_GPUParent_h__
|