2016-06-11 05:27:24 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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/. */
|
|
|
|
|
2016-08-04 21:33:42 +03:00
|
|
|
include GraphicsMessages;
|
2016-07-18 07:24:28 +03:00
|
|
|
include protocol PCompositorBridge;
|
2016-07-20 10:19:27 +03:00
|
|
|
include protocol PImageBridge;
|
2016-07-21 10:14:59 +03:00
|
|
|
include protocol PVRManager;
|
2016-07-19 21:56:06 +03:00
|
|
|
include protocol PVsyncBridge;
|
2016-09-21 12:25:33 +03:00
|
|
|
include protocol PVideoDecoderManager;
|
2016-07-18 07:24:28 +03:00
|
|
|
|
2016-08-16 23:59:13 +03:00
|
|
|
using base::ProcessId from "base/process.h";
|
2016-07-26 11:57:11 +03:00
|
|
|
using mozilla::TimeDuration from "mozilla/TimeStamp.h";
|
2016-07-18 07:24:28 +03:00
|
|
|
using mozilla::CSSToLayoutDeviceScale from "Units.h";
|
|
|
|
using mozilla::gfx::IntSize from "mozilla/gfx/2D.h";
|
2016-06-27 09:33:20 +03:00
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
2016-06-27 09:33:20 +03:00
|
|
|
union GfxPrefValue {
|
|
|
|
bool;
|
|
|
|
int32_t;
|
|
|
|
uint32_t;
|
|
|
|
float;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GfxPrefSetting {
|
|
|
|
int32_t index;
|
|
|
|
GfxPrefValue value;
|
|
|
|
};
|
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
sync protocol PGPU
|
|
|
|
{
|
|
|
|
parent:
|
2016-06-27 09:33:20 +03:00
|
|
|
// Sent by the UI process to initiate core settings.
|
2016-08-21 06:59:10 +03:00
|
|
|
async Init(GfxPrefSetting[] prefs,
|
|
|
|
GfxVarUpdate[] vars,
|
|
|
|
DevicePrefs devicePrefs);
|
2016-06-27 09:33:20 +03:00
|
|
|
|
2016-07-20 10:19:27 +03:00
|
|
|
async InitVsyncBridge(Endpoint<PVsyncBridgeParent> endpoint);
|
|
|
|
async InitImageBridge(Endpoint<PImageBridgeParent> endpoint);
|
2016-07-21 10:14:59 +03:00
|
|
|
async InitVRManager(Endpoint<PVRManagerParent> endpoint);
|
2016-07-19 21:56:06 +03:00
|
|
|
|
2016-08-04 21:33:42 +03:00
|
|
|
// Called to update a gfx preference or variable.
|
2016-06-27 09:33:20 +03:00
|
|
|
async UpdatePref(GfxPrefSetting pref);
|
2016-08-04 21:33:42 +03:00
|
|
|
async UpdateVar(GfxVarUpdate var);
|
2016-07-18 07:24:28 +03:00
|
|
|
|
|
|
|
// Create a new top-level compositor.
|
|
|
|
async NewWidgetCompositor(Endpoint<PCompositorBridgeParent> endpoint,
|
|
|
|
CSSToLayoutDeviceScale scale,
|
2016-07-26 11:57:11 +03:00
|
|
|
TimeDuration vsyncRate,
|
2016-07-18 07:24:28 +03:00
|
|
|
bool useExternalSurface,
|
|
|
|
IntSize surfaceSize);
|
2016-07-18 07:24:28 +03:00
|
|
|
|
|
|
|
// Create a new content-process compositor bridge.
|
|
|
|
async NewContentCompositorBridge(Endpoint<PCompositorBridgeParent> endpoint);
|
2016-07-20 10:19:27 +03:00
|
|
|
async NewContentImageBridge(Endpoint<PImageBridgeParent> endpoint);
|
2016-07-21 10:14:59 +03:00
|
|
|
async NewContentVRManager(Endpoint<PVRManagerParent> endpoint);
|
2016-09-21 12:25:33 +03:00
|
|
|
async NewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent> endpoint);
|
2016-08-17 19:11:00 +03:00
|
|
|
|
|
|
|
async DeallocateLayerTreeId(uint64_t layersId);
|
2016-08-21 06:59:11 +03:00
|
|
|
|
2016-08-16 23:59:13 +03:00
|
|
|
// Called to notify the GPU process of who owns a layersId.
|
|
|
|
sync AddLayerTreeIdMapping(uint64_t layersId, ProcessId ownerId);
|
|
|
|
|
2016-08-21 06:59:11 +03:00
|
|
|
// Request the current DeviceStatus from the GPU process. This blocks until
|
|
|
|
// one is available (i.e., Init has completed).
|
|
|
|
sync GetDeviceStatus() returns (GPUDeviceData status);
|
|
|
|
|
|
|
|
child:
|
|
|
|
// Sent when the GPU process has initialized devices. This occurs once, after
|
|
|
|
// Init().
|
|
|
|
async InitComplete(GPUDeviceData data);
|
2016-06-11 05:27:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|