2016-06-11 02:27:24 +00: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 18:33:42 +00:00
|
|
|
include GraphicsMessages;
|
2017-03-21 23:39:13 +00:00
|
|
|
include ProfilerTypes;
|
2017-01-27 00:35:54 +00:00
|
|
|
include MemoryReportTypes;
|
2016-07-18 04:24:28 +00:00
|
|
|
include protocol PCompositorBridge;
|
2016-07-20 07:19:27 +00:00
|
|
|
include protocol PImageBridge;
|
2016-07-21 07:14:59 +00:00
|
|
|
include protocol PVRManager;
|
2016-07-19 18:56:06 +00:00
|
|
|
include protocol PVsyncBridge;
|
2017-01-05 19:04:38 +00:00
|
|
|
include protocol PUiCompositorController;
|
2016-09-21 09:25:33 +00:00
|
|
|
include protocol PVideoDecoderManager;
|
2016-07-18 04:24:28 +00:00
|
|
|
|
2016-08-16 20:59:13 +00:00
|
|
|
using base::ProcessId from "base/process.h";
|
2016-07-26 08:57:11 +00:00
|
|
|
using mozilla::TimeDuration from "mozilla/TimeStamp.h";
|
2016-07-18 04:24:28 +00:00
|
|
|
using mozilla::CSSToLayoutDeviceScale from "Units.h";
|
2017-02-15 22:44:29 +00:00
|
|
|
using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
|
2016-07-18 04:24:28 +00:00
|
|
|
using mozilla::gfx::IntSize from "mozilla/gfx/2D.h";
|
2017-01-12 22:29:41 +00:00
|
|
|
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
|
2016-10-31 05:35:57 +00:00
|
|
|
using mozilla::Telemetry::Accumulation from "mozilla/TelemetryComms.h";
|
|
|
|
using mozilla::Telemetry::KeyedAccumulation from "mozilla/TelemetryComms.h";
|
2017-01-16 04:12:00 +00:00
|
|
|
using mozilla::Telemetry::ScalarAction from "mozilla/TelemetryComms.h";
|
|
|
|
using mozilla::Telemetry::KeyedScalarAction from "mozilla/TelemetryComms.h";
|
2017-02-14 13:43:51 +00:00
|
|
|
using mozilla::Telemetry::ChildEventData from "mozilla/TelemetryComms.h";
|
2016-06-27 06:33:20 +00:00
|
|
|
|
2016-06-11 02:27:24 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
2016-06-27 06:33:20 +00:00
|
|
|
union GfxPrefValue {
|
|
|
|
bool;
|
|
|
|
int32_t;
|
|
|
|
uint32_t;
|
|
|
|
float;
|
2016-11-23 01:38:02 +00:00
|
|
|
nsCString;
|
2016-06-27 06:33:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct GfxPrefSetting {
|
|
|
|
int32_t index;
|
|
|
|
GfxPrefValue value;
|
|
|
|
};
|
|
|
|
|
2016-11-02 20:55:07 +00:00
|
|
|
struct LayerTreeIdMapping {
|
|
|
|
uint64_t layersId;
|
|
|
|
ProcessId ownerId;
|
|
|
|
};
|
|
|
|
|
2016-06-11 02:27:24 +00:00
|
|
|
sync protocol PGPU
|
|
|
|
{
|
|
|
|
parent:
|
2016-06-27 06:33:20 +00:00
|
|
|
// Sent by the UI process to initiate core settings.
|
2016-08-21 03:59:10 +00:00
|
|
|
async Init(GfxPrefSetting[] prefs,
|
|
|
|
GfxVarUpdate[] vars,
|
|
|
|
DevicePrefs devicePrefs);
|
2016-06-27 06:33:20 +00:00
|
|
|
|
2016-07-20 07:19:27 +00:00
|
|
|
async InitVsyncBridge(Endpoint<PVsyncBridgeParent> endpoint);
|
|
|
|
async InitImageBridge(Endpoint<PImageBridgeParent> endpoint);
|
2016-07-21 07:14:59 +00:00
|
|
|
async InitVRManager(Endpoint<PVRManagerParent> endpoint);
|
2017-01-05 19:04:38 +00:00
|
|
|
async InitUiCompositorController(Endpoint<PUiCompositorControllerParent> endpoint);
|
2016-07-19 18:56:06 +00:00
|
|
|
|
2016-08-04 18:33:42 +00:00
|
|
|
// Called to update a gfx preference or variable.
|
2016-06-27 06:33:20 +00:00
|
|
|
async UpdatePref(GfxPrefSetting pref);
|
2016-08-04 18:33:42 +00:00
|
|
|
async UpdateVar(GfxVarUpdate var);
|
2016-07-18 04:24:28 +00:00
|
|
|
|
|
|
|
// Create a new top-level compositor.
|
|
|
|
async NewWidgetCompositor(Endpoint<PCompositorBridgeParent> endpoint,
|
|
|
|
CSSToLayoutDeviceScale scale,
|
2016-07-26 08:57:11 +00:00
|
|
|
TimeDuration vsyncRate,
|
2017-01-12 22:29:41 +00:00
|
|
|
CompositorOptions options,
|
2016-07-18 04:24:28 +00:00
|
|
|
bool useExternalSurface,
|
|
|
|
IntSize surfaceSize);
|
2016-07-18 04:24:28 +00:00
|
|
|
|
|
|
|
// Create a new content-process compositor bridge.
|
|
|
|
async NewContentCompositorBridge(Endpoint<PCompositorBridgeParent> endpoint);
|
2016-07-20 07:19:27 +00:00
|
|
|
async NewContentImageBridge(Endpoint<PImageBridgeParent> endpoint);
|
2016-07-21 07:14:59 +00:00
|
|
|
async NewContentVRManager(Endpoint<PVRManagerParent> endpoint);
|
2016-09-21 09:25:33 +00:00
|
|
|
async NewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent> endpoint);
|
2016-08-17 16:11:00 +00:00
|
|
|
|
2016-08-16 20:59:13 +00:00
|
|
|
// Called to notify the GPU process of who owns a layersId.
|
2016-11-02 20:55:07 +00:00
|
|
|
sync AddLayerTreeIdMapping(LayerTreeIdMapping[] mapping);
|
|
|
|
async RemoveLayerTreeIdMapping(LayerTreeIdMapping mapping);
|
2016-08-16 20:59:13 +00:00
|
|
|
|
2016-08-21 03:59:11 +00: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 12:45:02 +00:00
|
|
|
// Have a message be broadcasted to the GPU process by the GPU process
|
|
|
|
// observer service.
|
|
|
|
async NotifyGpuObservers(nsCString aTopic);
|
|
|
|
|
2017-03-21 23:39:13 +00:00
|
|
|
// Control the Gecko Profiler in the GPU process.
|
|
|
|
async StartProfiler(ProfilerInitParams params);
|
|
|
|
async StopProfiler();
|
|
|
|
async PauseProfiler(bool aPause);
|
|
|
|
async GatherProfile();
|
|
|
|
|
2017-01-27 00:35:54 +00:00
|
|
|
async RequestMemoryReport(uint32_t generation,
|
|
|
|
bool anonymize,
|
|
|
|
bool minimizeMemoryUsage,
|
|
|
|
MaybeFileDesc DMDFile);
|
|
|
|
|
2016-08-21 03:59:11 +00:00
|
|
|
child:
|
|
|
|
// Sent when the GPU process has initialized devices. This occurs once, after
|
|
|
|
// Init().
|
|
|
|
async InitComplete(GPUDeviceData data);
|
2016-09-22 05:38:44 +00:00
|
|
|
|
|
|
|
// Sent when APZ detects checkerboarding and apz checkerboard reporting is enabled.
|
|
|
|
async ReportCheckerboard(uint32_t severity, nsCString log);
|
2016-09-30 21:31:06 +00:00
|
|
|
|
|
|
|
// Graphics errors, analogous to PContent::GraphicsError
|
|
|
|
async GraphicsError(nsCString aError);
|
2016-10-11 21:25:41 +00:00
|
|
|
|
2017-02-15 22:44:29 +00:00
|
|
|
async InitCrashReporter(Shmem shmem, NativeThreadId threadId);
|
2016-10-15 12:45:02 +00:00
|
|
|
|
|
|
|
// Have a message be broadcasted to the UI process by the UI process
|
|
|
|
// observer service.
|
|
|
|
async NotifyUiObservers(nsCString aTopic);
|
2016-10-31 05:35:57 +00:00
|
|
|
|
|
|
|
// Messages for reporting telemetry to the UI process.
|
2017-02-15 15:25:40 +00:00
|
|
|
async AccumulateChildHistograms(Accumulation[] accumulations);
|
|
|
|
async AccumulateChildKeyedHistograms(KeyedAccumulation[] accumulations);
|
2017-01-16 04:12:00 +00:00
|
|
|
async UpdateChildScalars(ScalarAction[] actions);
|
|
|
|
async UpdateChildKeyedScalars(KeyedScalarAction[] actions);
|
2017-02-14 13:43:51 +00:00
|
|
|
async RecordChildEvents(ChildEventData[] events);
|
2016-11-06 19:01:52 +00:00
|
|
|
|
|
|
|
async NotifyDeviceReset();
|
2017-01-27 00:35:54 +00:00
|
|
|
|
2017-03-21 23:39:13 +00:00
|
|
|
// Called in response to GatherProfile.
|
|
|
|
async Profile(nsCString aProfile);
|
2017-01-27 00:35:54 +00:00
|
|
|
async AddMemoryReport(MemoryReport aReport);
|
|
|
|
async FinishMemoryReport(uint32_t aGeneration);
|
2016-06-11 02:27:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|