Bug 1352376 - Update device data while processing device reset; r?dvander
MozReview-Commit-ID: 9sqdRhsX5HU
--- a/gfx/ipc/GPUChild.cpp
+++ b/gfx/ipc/GPUChild.cpp
@@ -193,18 +193,19 @@ GPUChild::RecvUpdateChildKeyedScalars(In
mozilla::ipc::IPCResult
GPUChild::RecvRecordChildEvents(nsTArray<mozilla::Telemetry::ChildEventData>&& aEvents)
{
TelemetryIPC::RecordChildEvents(GeckoProcessType_GPU, aEvents);
return IPC_OK();
}
mozilla::ipc::IPCResult
-GPUChild::RecvNotifyDeviceReset()
+GPUChild::RecvNotifyDeviceReset(const GPUDeviceData& aData)
{
+ gfxPlatform::GetPlatform()->ImportGPUDeviceData(aData);
mHost->mListener->OnProcessDeviceReset(mHost);
return IPC_OK();
}
mozilla::ipc::IPCResult
GPUChild::RecvProfile(const nsCString& aProfile)
{
#ifdef MOZ_GECKO_PROFILER
--- a/gfx/ipc/GPUChild.h
+++ b/gfx/ipc/GPUChild.h
@@ -55,17 +55,17 @@ public:
mozilla::ipc::IPCResult RecvAccumulateChildKeyedHistograms(InfallibleTArray<KeyedAccumulation>&& aAccumulations) override;
mozilla::ipc::IPCResult RecvUpdateChildScalars(InfallibleTArray<ScalarAction>&& aScalarActions) override;
mozilla::ipc::IPCResult RecvUpdateChildKeyedScalars(InfallibleTArray<KeyedScalarAction>&& aScalarActions) override;
mozilla::ipc::IPCResult RecvRecordChildEvents(nsTArray<ChildEventData>&& events) override;
void ActorDestroy(ActorDestroyReason aWhy) override;
mozilla::ipc::IPCResult RecvGraphicsError(const nsCString& aError) override;
mozilla::ipc::IPCResult RecvNotifyUiObservers(const nsCString& aTopic) override;
- mozilla::ipc::IPCResult RecvNotifyDeviceReset() override;
+ mozilla::ipc::IPCResult RecvNotifyDeviceReset(const GPUDeviceData& aData) override;
mozilla::ipc::IPCResult RecvProfile(const nsCString& aProfile) override;
mozilla::ipc::IPCResult RecvAddMemoryReport(const MemoryReport& aReport) override;
mozilla::ipc::IPCResult RecvFinishMemoryReport(const uint32_t& aGeneration) override;
void SendStartProfiler(const ProfilerInitParams& aParams) override;
void SendStopProfiler() override;
void SendPauseProfiler(const bool& aPause) override;
void SendGatherProfile() override;
--- a/gfx/ipc/GPUParent.cpp
+++ b/gfx/ipc/GPUParent.cpp
@@ -136,17 +136,19 @@ GPUParent::NotifyDeviceReset()
// If the device doesn't need to be reset then the device
// has already been reset by a previous NotifyDeviceReset message.
return;
}
#endif
// Notify the main process that there's been a device reset
// and that they should reset their compositors and repaint
- Unused << SendNotifyDeviceReset();
+ GPUDeviceData data;
+ RecvGetDeviceStatus(&data);
+ Unused << SendNotifyDeviceReset(data);
}
mozilla::ipc::IPCResult
GPUParent::RecvInit(nsTArray<GfxPrefSetting>&& prefs,
nsTArray<GfxVarUpdate>&& vars,
const DevicePrefs& devicePrefs,
nsTArray<LayerTreeIdMapping>&& aMappings)
{
--- a/gfx/ipc/PGPU.ipdl
+++ b/gfx/ipc/PGPU.ipdl
@@ -120,17 +120,17 @@ child:
// Messages for reporting telemetry to the UI process.
async AccumulateChildHistograms(Accumulation[] accumulations);
async AccumulateChildKeyedHistograms(KeyedAccumulation[] accumulations);
async UpdateChildScalars(ScalarAction[] actions);
async UpdateChildKeyedScalars(KeyedScalarAction[] actions);
async RecordChildEvents(ChildEventData[] events);
- async NotifyDeviceReset();
+ async NotifyDeviceReset(GPUDeviceData status);
// Called in response to GatherProfile.
async Profile(nsCString aProfile);
async AddMemoryReport(MemoryReport aReport);
async FinishMemoryReport(uint32_t aGeneration);
};
} // namespace gfx