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";
|
2017-01-13 01:29:41 +03:00
|
|
|
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
|
2016-10-31 08:35:57 +03:00
|
|
|
using mozilla::Telemetry::Accumulation from "mozilla/TelemetryComms.h";
|
|
|
|
using mozilla::Telemetry::KeyedAccumulation from "mozilla/TelemetryComms.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;
|
2016-11-23 04:38:02 +03:00
|
|
|
nsCString;
|
2016-06-27 09:33:20 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct GfxPrefSetting {
|
|
|
|
int32_t index;
|
|
|
|
GfxPrefValue value;
|
|
|
|
};
|
|
|
|
|
2016-11-02 23:55:07 +03:00
|
|
|
struct LayerTreeIdMapping {
|
|
|
|
uint64_t layersId;
|
|
|
|
ProcessId ownerId;
|
|
|
|
};
|
|
|
|
|
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,
|
2017-01-13 01:29:41 +03:00
|
|
|
CompositorOptions options,
|
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
|
|
|
|
2016-08-16 23:59:13 +03:00
|
|
|
// Called to notify the GPU process of who owns a layersId.
|
2016-11-02 23:55:07 +03:00
|
|
|
sync AddLayerTreeIdMapping(LayerTreeIdMapping[] mapping);
|
|
|
|
async RemoveLayerTreeIdMapping(LayerTreeIdMapping mapping);
|
2016-08-16 23:59:13 +03:00
|
|
|
|
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);
|
|
|
|
|
2016-10-15 15:45:02 +03:00
|
|
|
// Have a message be broadcasted to the GPU process by the GPU process
|
|
|
|
// observer service.
|
|
|
|
async NotifyGpuObservers(nsCString aTopic);
|
|
|
|
|
2016-08-21 06:59:11 +03:00
|
|
|
child:
|
|
|
|
// Sent when the GPU process has initialized devices. This occurs once, after
|
|
|
|
// Init().
|
|
|
|
async InitComplete(GPUDeviceData data);
|
2016-09-22 08:38:44 +03:00
|
|
|
|
|
|
|
// Sent when APZ detects checkerboarding and apz checkerboard reporting is enabled.
|
|
|
|
async ReportCheckerboard(uint32_t severity, nsCString log);
|
2016-10-01 00:31:06 +03:00
|
|
|
|
|
|
|
// Graphics errors, analogous to PContent::GraphicsError
|
|
|
|
async GraphicsError(nsCString aError);
|
2016-10-12 00:25:41 +03:00
|
|
|
|
|
|
|
async InitCrashReporter(Shmem shmem);
|
2016-10-15 15:45:02 +03:00
|
|
|
|
|
|
|
// Have a message be broadcasted to the UI process by the UI process
|
|
|
|
// observer service.
|
|
|
|
async NotifyUiObservers(nsCString aTopic);
|
2016-10-31 08:35:57 +03:00
|
|
|
|
|
|
|
// Messages for reporting telemetry to the UI process.
|
|
|
|
async AccumulateChildHistogram(Accumulation[] accumulations);
|
|
|
|
async AccumulateChildKeyedHistogram(KeyedAccumulation[] accumulations);
|
2016-11-06 22:01:52 +03:00
|
|
|
|
|
|
|
async NotifyDeviceReset();
|
2016-06-11 05:27:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|