2016-06-11 05:27:24 +03: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 21:56:06 +03:00
|
|
|
#include "mozilla/RefPtr.h"
|
2016-06-11 05:27:24 +03:00
|
|
|
#include "mozilla/gfx/PGPUParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
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();
|
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
bool Init(base::ProcessId aParentPid,
|
|
|
|
MessageLoop* aIOLoop,
|
|
|
|
IPC::Channel* aChannel);
|
|
|
|
|
2016-08-04 21:33:42 +03:00
|
|
|
bool RecvInit(nsTArray<GfxPrefSetting>&& prefs,
|
2016-08-21 06:59:10 +03:00
|
|
|
nsTArray<GfxVarUpdate>&& vars,
|
|
|
|
const DevicePrefs& devicePrefs) override;
|
2016-07-19 21:56:06 +03:00
|
|
|
bool RecvInitVsyncBridge(Endpoint<PVsyncBridgeParent>&& aVsyncEndpoint) override;
|
2016-07-20 10:19:27 +03:00
|
|
|
bool RecvInitImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override;
|
2016-07-21 10:14:59 +03:00
|
|
|
bool RecvInitVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override;
|
2016-06-27 09:33:20 +03:00
|
|
|
bool RecvUpdatePref(const GfxPrefSetting& pref) override;
|
2016-08-04 21:33:42 +03:00
|
|
|
bool RecvUpdateVar(const GfxVarUpdate& pref) override;
|
2016-07-18 07:24:28 +03:00
|
|
|
bool RecvNewWidgetCompositor(
|
|
|
|
Endpoint<PCompositorBridgeParent>&& aEndpoint,
|
|
|
|
const CSSToLayoutDeviceScale& aScale,
|
2016-07-26 11:57:11 +03:00
|
|
|
const TimeDuration& aVsyncRate,
|
2016-07-18 07:24:28 +03:00
|
|
|
const bool& aUseExternalSurface,
|
|
|
|
const IntSize& aSurfaceSize) override;
|
2016-07-18 07:24:28 +03:00
|
|
|
bool RecvNewContentCompositorBridge(Endpoint<PCompositorBridgeParent>&& aEndpoint) override;
|
2016-07-20 10:19:27 +03:00
|
|
|
bool RecvNewContentImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override;
|
2016-07-21 10:14:59 +03:00
|
|
|
bool RecvNewContentVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override;
|
2016-09-21 12:25:33 +03:00
|
|
|
bool RecvNewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent>&& aEndpoint) override;
|
2016-08-17 19:11:00 +03:00
|
|
|
bool RecvDeallocateLayerTreeId(const uint64_t& aLayersId) override;
|
2016-08-21 06:59:11 +03:00
|
|
|
bool RecvGetDeviceStatus(GPUDeviceData* aOutStatus) override;
|
2016-08-16 23:59:13 +03:00
|
|
|
bool RecvAddLayerTreeIdMapping(const uint64_t& aLayersId, const ProcessId& aOwnerId) override;
|
2016-06-11 05:27:24 +03:00
|
|
|
|
|
|
|
void ActorDestroy(ActorDestroyReason aWhy) override;
|
2016-07-19 21:56:06 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
RefPtr<VsyncBridgeParent> mVsyncBridge;
|
2016-06-11 05:27:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // _include_gfx_ipc_GPUParent_h__
|