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;
|
2017-01-27 03:35:54 +03:00
|
|
|
include MemoryReportTypes;
|
2018-01-11 01:27:18 +03:00
|
|
|
include HangTypes;
|
2018-03-16 23:28:19 +03:00
|
|
|
include protocol PAPZInputBridge;
|
2017-06-14 18:39:59 +03:00
|
|
|
include protocol PCompositorManager;
|
2016-07-20 10:19:27 +03:00
|
|
|
include protocol PImageBridge;
|
2017-05-30 22:06:14 +03:00
|
|
|
include protocol PProfiler;
|
2018-08-07 08:47:18 +03:00
|
|
|
include protocol PVRGPU;
|
2016-07-21 10:14:59 +03:00
|
|
|
include protocol PVRManager;
|
2016-07-19 21:56:06 +03:00
|
|
|
include protocol PVsyncBridge;
|
2017-01-05 22:04:38 +03:00
|
|
|
include protocol PUiCompositorController;
|
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";
|
2017-02-16 01:44:29 +03:00
|
|
|
using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
|
2017-09-13 12:20:36 +03:00
|
|
|
using mozilla::Telemetry::HistogramAccumulation from "mozilla/TelemetryComms.h";
|
|
|
|
using mozilla::Telemetry::KeyedHistogramAccumulation from "mozilla/TelemetryComms.h";
|
2017-01-16 07:12:00 +03:00
|
|
|
using mozilla::Telemetry::ScalarAction from "mozilla/TelemetryComms.h";
|
|
|
|
using mozilla::Telemetry::KeyedScalarAction from "mozilla/TelemetryComms.h";
|
2017-02-14 16:43:51 +03:00
|
|
|
using mozilla::Telemetry::ChildEventData from "mozilla/TelemetryComms.h";
|
2017-06-09 16:53:42 +03:00
|
|
|
using mozilla::Telemetry::DiscardedData from "mozilla/TelemetryComms.h";
|
2017-06-24 00:23:12 +03:00
|
|
|
using mozilla::gfx::Feature from "gfxFeature.h";
|
2017-07-11 10:13:26 +03:00
|
|
|
using mozilla::gfx::Fallback from "gfxFallback.h";
|
2018-03-25 02:06:01 +03:00
|
|
|
using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
|
2016-06-27 09:33:20 +03:00
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
2016-11-02 23:55:07 +03:00
|
|
|
struct LayerTreeIdMapping {
|
2018-03-25 02:06:01 +03:00
|
|
|
LayersId layersId;
|
2016-11-02 23:55:07 +03:00
|
|
|
ProcessId ownerId;
|
|
|
|
};
|
|
|
|
|
2018-03-16 23:28:19 +03:00
|
|
|
// This protocol allows the UI process to talk to the GPU process. There is one
|
|
|
|
// instance of this protocol, with the GPUParent living on the main thread of
|
|
|
|
// the GPU process and the GPUChild living on the main thread of the UI process.
|
2016-06-11 05:27:24 +03:00
|
|
|
sync protocol PGPU
|
|
|
|
{
|
2018-03-16 23:28:19 +03:00
|
|
|
manages PAPZInputBridge;
|
|
|
|
|
2016-06-11 05:27:24 +03:00
|
|
|
parent:
|
2018-03-16 23:28:19 +03:00
|
|
|
// Sent from the UI process to initialize a new APZ input bridge when a new
|
|
|
|
// top-level compositor is created.
|
2018-03-25 02:06:01 +03:00
|
|
|
async PAPZInputBridge(LayersId aLayersId);
|
2018-03-16 23:28:19 +03:00
|
|
|
|
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,
|
2017-04-04 01:13:38 +03:00
|
|
|
DevicePrefs devicePrefs,
|
|
|
|
LayerTreeIdMapping[] mapping);
|
2016-06-27 09:33:20 +03:00
|
|
|
|
2017-06-14 18:39:59 +03:00
|
|
|
async InitCompositorManager(Endpoint<PCompositorManagerParent> endpoint);
|
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);
|
2018-03-25 02:06:01 +03:00
|
|
|
async InitUiCompositorController(LayersId rootLayerTreeId, Endpoint<PUiCompositorControllerParent> endpoint);
|
2017-05-30 22:06:14 +03:00
|
|
|
async InitProfiler(Endpoint<PProfilerChild> endpoint);
|
2018-08-07 08:47:18 +03:00
|
|
|
// Forward GPU process its endpoints to the VR process.
|
|
|
|
async InitVR(Endpoint<PVRGPUChild> endpoint);
|
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
|
|
|
|
2016-07-18 07:24:28 +03:00
|
|
|
// Create a new content-process compositor bridge.
|
2017-06-14 18:39:59 +03:00
|
|
|
async NewContentCompositorManager(Endpoint<PCompositorManagerParent> 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.
|
2017-04-04 01:13:38 +03:00
|
|
|
sync AddLayerTreeIdMapping(LayerTreeIdMapping mapping);
|
2016-11-02 23:55:07 +03:00
|
|
|
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);
|
|
|
|
|
2017-11-03 11:06:37 +03:00
|
|
|
// Request to simulate device reset and to get the updated DeviceStatus from
|
|
|
|
// the GPU process. This blocks until one is available (i.e., Init has completed).
|
|
|
|
sync SimulateDeviceReset() 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);
|
|
|
|
|
2017-01-27 03:35:54 +03:00
|
|
|
async RequestMemoryReport(uint32_t generation,
|
|
|
|
bool anonymize,
|
|
|
|
bool minimizeMemoryUsage,
|
|
|
|
MaybeFileDesc DMDFile);
|
2018-08-07 08:47:18 +03:00
|
|
|
async ShutdownVR();
|
2017-01-27 03:35:54 +03:00
|
|
|
|
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
|
|
|
|
2017-02-16 01:44:29 +03:00
|
|
|
async InitCrashReporter(Shmem shmem, NativeThreadId threadId);
|
2016-10-15 15:45:02 +03:00
|
|
|
|
2018-08-07 08:47:18 +03:00
|
|
|
async CreateVRProcess();
|
|
|
|
|
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.
|
2017-09-13 12:20:36 +03:00
|
|
|
async AccumulateChildHistograms(HistogramAccumulation[] accumulations);
|
|
|
|
async AccumulateChildKeyedHistograms(KeyedHistogramAccumulation[] accumulations);
|
2017-01-16 07:12:00 +03:00
|
|
|
async UpdateChildScalars(ScalarAction[] actions);
|
|
|
|
async UpdateChildKeyedScalars(KeyedScalarAction[] actions);
|
2017-02-14 16:43:51 +03:00
|
|
|
async RecordChildEvents(ChildEventData[] events);
|
2017-06-09 16:53:42 +03:00
|
|
|
async RecordDiscardedData(DiscardedData data);
|
2016-11-06 22:01:52 +03:00
|
|
|
|
2017-04-05 10:17:36 +03:00
|
|
|
async NotifyDeviceReset(GPUDeviceData status);
|
2017-01-27 03:35:54 +03:00
|
|
|
|
|
|
|
async AddMemoryReport(MemoryReport aReport);
|
|
|
|
async FinishMemoryReport(uint32_t aGeneration);
|
2017-06-24 00:23:12 +03:00
|
|
|
|
|
|
|
// Update the UI process after a feature's status has changed. This is used
|
|
|
|
// outside of the normal startup flow.
|
|
|
|
async UpdateFeature(Feature aFeature, FeatureFailure aChange);
|
2017-07-11 10:13:26 +03:00
|
|
|
|
|
|
|
// Notify about:support/Telemetry that a fallback occurred.
|
|
|
|
async UsedFallback(Fallback aFallback, nsCString message);
|
2017-07-20 19:49:28 +03:00
|
|
|
|
|
|
|
async BHRThreadHang(HangDetails aDetails);
|
2016-06-11 05:27:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|