diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-10 11:39:27 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-10 11:39:27 +0100 |
commit | 974a481d12bf430891725bd3662876358e57e11a (patch) | |
tree | cad011151456251fef2f1b8d02ef4b4e45fad61a /gfx/ipc | |
parent | 6bd66b1728eeddb058066edda740aaeb2ceaec23 (diff) | |
parent | 736d25cbec4541186ed46c935c117ce4d1c7f3bb (diff) | |
download | UXP-974a481d12bf430891725bd3662876358e57e11a.tar UXP-974a481d12bf430891725bd3662876358e57e11a.tar.gz UXP-974a481d12bf430891725bd3662876358e57e11a.tar.lz UXP-974a481d12bf430891725bd3662876358e57e11a.tar.xz UXP-974a481d12bf430891725bd3662876358e57e11a.zip |
Merge branch 'master' into js-modules
# Conflicts:
# modules/libpref/init/all.js
Diffstat (limited to 'gfx/ipc')
-rw-r--r-- | gfx/ipc/GPUChild.cpp | 22 | ||||
-rw-r--r-- | gfx/ipc/GPUChild.h | 2 | ||||
-rw-r--r-- | gfx/ipc/GPUParent.cpp | 17 | ||||
-rw-r--r-- | gfx/ipc/GPUParent.h | 2 | ||||
-rw-r--r-- | gfx/ipc/GPUProcessManager.cpp | 71 | ||||
-rw-r--r-- | gfx/ipc/GPUProcessManager.h | 5 | ||||
-rw-r--r-- | gfx/ipc/PGPU.ipdl | 9 | ||||
-rw-r--r-- | gfx/ipc/moz.build | 1 |
8 files changed, 1 insertions, 128 deletions
diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp index a075716e3..ba6053f43 100644 --- a/gfx/ipc/GPUChild.cpp +++ b/gfx/ipc/GPUChild.cpp @@ -8,7 +8,6 @@ #include "gfxPrefs.h" #include "GPUProcessHost.h" #include "GPUProcessManager.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/CheckerboardReportService.h" #include "mozilla/gfx/gfxVars.h" #if defined(XP_WIN) @@ -80,7 +79,6 @@ GPUChild::EnsureGPUReady() SendGetDeviceStatus(&data); gfxPlatform::GetPlatform()->ImportGPUDeviceData(data); - Telemetry::AccumulateTimeDelta(Telemetry::GPU_PROCESS_LAUNCH_TIME_MS, mHost->GetLaunchTime()); mGPUReady = true; } @@ -93,7 +91,6 @@ GPUChild::RecvInitComplete(const GPUDeviceData& aData) } gfxPlatform::GetPlatform()->ImportGPUDeviceData(aData); - Telemetry::AccumulateTimeDelta(Telemetry::GPU_PROCESS_LAUNCH_TIME_MS, mHost->GetLaunchTime()); mGPUReady = true; return true; } @@ -129,20 +126,6 @@ GPUChild::RecvNotifyUiObservers(const nsCString& aTopic) } bool -GPUChild::RecvAccumulateChildHistogram(InfallibleTArray<Accumulation>&& aAccumulations) -{ - Telemetry::AccumulateChild(GeckoProcessType_GPU, aAccumulations); - return true; -} - -bool -GPUChild::RecvAccumulateChildKeyedHistogram(InfallibleTArray<KeyedAccumulation>&& aAccumulations) -{ - Telemetry::AccumulateChildKeyed(GeckoProcessType_GPU, aAccumulations); - return true; -} - -bool GPUChild::RecvNotifyDeviceReset() { mHost->mListener->OnProcessDeviceReset(mHost); @@ -152,11 +135,6 @@ GPUChild::RecvNotifyDeviceReset() void GPUChild::ActorDestroy(ActorDestroyReason aWhy) { - if (aWhy == AbnormalShutdown) { - Telemetry::Accumulate(Telemetry::SUBPROCESS_ABNORMAL_ABORT, - nsDependentCString(XRE_ChildProcessTypeToString(GeckoProcessType_GPU), 1)); - } - gfxVars::RemoveReceiver(this); mHost->OnChannelClosed(); } diff --git a/gfx/ipc/GPUChild.h b/gfx/ipc/GPUChild.h index 888884ddf..fdb3931f7 100644 --- a/gfx/ipc/GPUChild.h +++ b/gfx/ipc/GPUChild.h @@ -34,8 +34,6 @@ public: // PGPUChild overrides. bool RecvInitComplete(const GPUDeviceData& aData) override; bool RecvReportCheckerboard(const uint32_t& aSeverity, const nsCString& aLog) override; - bool RecvAccumulateChildHistogram(InfallibleTArray<Accumulation>&& aAccumulations) override; - bool RecvAccumulateChildKeyedHistogram(InfallibleTArray<KeyedAccumulation>&& aAccumulations) override; void ActorDestroy(ActorDestroyReason aWhy) override; bool RecvGraphicsError(const nsCString& aError) override; bool RecvNotifyUiObservers(const nsCString& aTopic) override; diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp index b693f4728..6833f5690 100644 --- a/gfx/ipc/GPUParent.cpp +++ b/gfx/ipc/GPUParent.cpp @@ -24,12 +24,9 @@ #include "mozilla/dom/VideoDecoderManagerChild.h" #include "mozilla/layers/LayerTreeOwnerTracker.h" #include "nsDebugImpl.h" -#include "nsExceptionHandler.h" #include "nsThreadManager.h" #include "prenv.h" #include "ProcessUtils.h" -#include "VRManager.h" -#include "VRManagerParent.h" #include "VsyncBridgeParent.h" #if defined(XP_WIN) # include "DeviceManagerD3D9.h" @@ -100,7 +97,6 @@ GPUParent::Init(base::ProcessId aParentPid, CompositorThreadHolder::Start(); APZThreadUtils::SetControllerThread(CompositorThreadHolder::Loop()); APZCTreeManager::InitializeGlobalState(); - VRManager::ManagerInit(); LayerTreeOwnerTracker::Initialize(); mozilla::ipc::SetThisProcessName("GPU Process"); #ifdef XP_WIN @@ -203,13 +199,6 @@ GPUParent::RecvInitImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) } bool -GPUParent::RecvInitVRManager(Endpoint<PVRManagerParent>&& aEndpoint) -{ - VRManagerParent::CreateForGPUProcess(Move(aEndpoint)); - return true; -} - -bool GPUParent::RecvUpdatePref(const GfxPrefSetting& setting) { gfxPrefs::Pref* pref = gfxPrefs::all()[setting.index()]; @@ -302,12 +291,6 @@ GPUParent::RecvNewContentImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) } bool -GPUParent::RecvNewContentVRManager(Endpoint<PVRManagerParent>&& aEndpoint) -{ - return VRManagerParent::CreateForContent(Move(aEndpoint)); -} - -bool GPUParent::RecvNewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent>&& aEndpoint) { return dom::VideoDecoderManagerParent::CreateForContent(Move(aEndpoint)); diff --git a/gfx/ipc/GPUParent.h b/gfx/ipc/GPUParent.h index 126efce50..3c0494bd4 100644 --- a/gfx/ipc/GPUParent.h +++ b/gfx/ipc/GPUParent.h @@ -32,7 +32,6 @@ public: const DevicePrefs& devicePrefs) override; bool RecvInitVsyncBridge(Endpoint<PVsyncBridgeParent>&& aVsyncEndpoint) override; bool RecvInitImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override; - bool RecvInitVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override; bool RecvUpdatePref(const GfxPrefSetting& pref) override; bool RecvUpdateVar(const GfxVarUpdate& pref) override; bool RecvNewWidgetCompositor( @@ -43,7 +42,6 @@ public: const IntSize& aSurfaceSize) override; bool RecvNewContentCompositorBridge(Endpoint<PCompositorBridgeParent>&& aEndpoint) override; bool RecvNewContentImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override; - bool RecvNewContentVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override; bool RecvNewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent>&& aEndpoint) override; bool RecvGetDeviceStatus(GPUDeviceData* aOutStatus) override; bool RecvAddLayerTreeIdMapping(nsTArray<LayerTreeIdMapping>&& aMappings) override; diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp index 0b55cd9b7..8aaf0f1d0 100644 --- a/gfx/ipc/GPUProcessManager.cpp +++ b/gfx/ipc/GPUProcessManager.cpp @@ -22,8 +22,6 @@ #endif #include "nsBaseWidget.h" #include "nsContentUtils.h" -#include "VRManagerChild.h" -#include "VRManagerParent.h" #include "VsyncBridgeChild.h" #include "VsyncIOThreadHolder.h" #include "VsyncSource.h" @@ -197,36 +195,6 @@ GPUProcessManager::EnsureImageBridgeChild() } void -GPUProcessManager::EnsureVRManager() -{ - if (VRManagerChild::IsCreated()) { - return; - } - - EnsureGPUReady(); - - if (!mGPUChild) { - VRManagerChild::InitSameProcess(); - return; - } - - ipc::Endpoint<PVRManagerParent> parentPipe; - ipc::Endpoint<PVRManagerChild> childPipe; - nsresult rv = PVRManager::CreateEndpoints( - mGPUChild->OtherPid(), - base::GetCurrentProcId(), - &parentPipe, - &childPipe); - if (NS_FAILED(rv)) { - DisableGPUProcess("Failed to create PVRManager endpoints"); - return; - } - - mGPUChild->SendInitVRManager(Move(parentPipe)); - VRManagerChild::InitWithGPUProcess(Move(childPipe)); -} - -void GPUProcessManager::OnProcessLaunchComplete(GPUProcessHost* aHost) { MOZ_ASSERT(mProcess && mProcess == aHost); @@ -488,7 +456,6 @@ GPUProcessManager::CreateTopLevelCompositor(nsBaseWidget* aWidget, EnsureGPUReady(); EnsureImageBridgeChild(); - EnsureVRManager(); if (mGPUChild) { RefPtr<CompositorSession> session = CreateRemoteSession( @@ -599,12 +566,10 @@ bool GPUProcessManager::CreateContentBridges(base::ProcessId aOtherProcess, ipc::Endpoint<PCompositorBridgeChild>* aOutCompositor, ipc::Endpoint<PImageBridgeChild>* aOutImageBridge, - ipc::Endpoint<PVRManagerChild>* aOutVRBridge, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutVideoManager) { if (!CreateContentCompositorBridge(aOtherProcess, aOutCompositor) || - !CreateContentImageBridge(aOtherProcess, aOutImageBridge) || - !CreateContentVRManager(aOtherProcess, aOutVRBridge)) + !CreateContentImageBridge(aOtherProcess, aOutImageBridge)) { return false; } @@ -692,40 +657,6 @@ GPUProcessManager::GPUProcessPid() return gpuPid; } -bool -GPUProcessManager::CreateContentVRManager(base::ProcessId aOtherProcess, - ipc::Endpoint<PVRManagerChild>* aOutEndpoint) -{ - EnsureVRManager(); - - base::ProcessId gpuPid = mGPUChild - ? mGPUChild->OtherPid() - : base::GetCurrentProcId(); - - ipc::Endpoint<PVRManagerParent> parentPipe; - ipc::Endpoint<PVRManagerChild> childPipe; - nsresult rv = PVRManager::CreateEndpoints( - gpuPid, - aOtherProcess, - &parentPipe, - &childPipe); - if (NS_FAILED(rv)) { - gfxCriticalNote << "Could not create content compositor bridge: " << hexa(int(rv)); - return false; - } - - if (mGPUChild) { - mGPUChild->SendNewContentVRManager(Move(parentPipe)); - } else { - if (!VRManagerParent::CreateForContent(Move(parentPipe))) { - return false; - } - } - - *aOutEndpoint = Move(childPipe); - return true; -} - void GPUProcessManager::CreateContentVideoDecoderManager(base::ProcessId aOtherProcess, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutEndpoint) diff --git a/gfx/ipc/GPUProcessManager.h b/gfx/ipc/GPUProcessManager.h index 84ed03609..5d4279094 100644 --- a/gfx/ipc/GPUProcessManager.h +++ b/gfx/ipc/GPUProcessManager.h @@ -45,7 +45,6 @@ namespace gfx { class GPUChild; class GPUProcessListener; -class PVRManagerChild; class VsyncBridgeChild; class VsyncIOThreadHolder; @@ -91,7 +90,6 @@ public: base::ProcessId aOtherProcess, ipc::Endpoint<PCompositorBridgeChild>* aOutCompositor, ipc::Endpoint<PImageBridgeChild>* aOutImageBridge, - ipc::Endpoint<PVRManagerChild>* aOutVRBridge, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutVideoManager); // This returns a reference to the APZCTreeManager to which @@ -156,8 +154,6 @@ private: ipc::Endpoint<PCompositorBridgeChild>* aOutEndpoint); bool CreateContentImageBridge(base::ProcessId aOtherProcess, ipc::Endpoint<PImageBridgeChild>* aOutEndpoint); - bool CreateContentVRManager(base::ProcessId aOtherProcess, - ipc::Endpoint<PVRManagerChild>* aOutEndpoint); void CreateContentVideoDecoderManager(base::ProcessId aOtherProcess, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutEndPoint); @@ -182,7 +178,6 @@ private: void ShutdownVsyncIOThread(); void EnsureImageBridgeChild(); - void EnsureVRManager(); RefPtr<CompositorSession> CreateRemoteSession( nsBaseWidget* aWidget, diff --git a/gfx/ipc/PGPU.ipdl b/gfx/ipc/PGPU.ipdl index d36c51394..db3f6e503 100644 --- a/gfx/ipc/PGPU.ipdl +++ b/gfx/ipc/PGPU.ipdl @@ -6,7 +6,6 @@ include GraphicsMessages; include protocol PCompositorBridge; include protocol PImageBridge; -include protocol PVRManager; include protocol PVsyncBridge; include protocol PVideoDecoderManager; @@ -14,8 +13,6 @@ using base::ProcessId from "base/process.h"; using mozilla::TimeDuration from "mozilla/TimeStamp.h"; using mozilla::CSSToLayoutDeviceScale from "Units.h"; using mozilla::gfx::IntSize from "mozilla/gfx/2D.h"; -using mozilla::Telemetry::Accumulation from "mozilla/TelemetryComms.h"; -using mozilla::Telemetry::KeyedAccumulation from "mozilla/TelemetryComms.h"; namespace mozilla { namespace gfx { @@ -47,7 +44,6 @@ parent: async InitVsyncBridge(Endpoint<PVsyncBridgeParent> endpoint); async InitImageBridge(Endpoint<PImageBridgeParent> endpoint); - async InitVRManager(Endpoint<PVRManagerParent> endpoint); // Called to update a gfx preference or variable. async UpdatePref(GfxPrefSetting pref); @@ -63,7 +59,6 @@ parent: // Create a new content-process compositor bridge. async NewContentCompositorBridge(Endpoint<PCompositorBridgeParent> endpoint); async NewContentImageBridge(Endpoint<PImageBridgeParent> endpoint); - async NewContentVRManager(Endpoint<PVRManagerParent> endpoint); async NewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent> endpoint); // Called to notify the GPU process of who owns a layersId. @@ -93,10 +88,6 @@ child: // observer service. async NotifyUiObservers(nsCString aTopic); - // Messages for reporting telemetry to the UI process. - async AccumulateChildHistogram(Accumulation[] accumulations); - async AccumulateChildKeyedHistogram(KeyedAccumulation[] accumulations); - async NotifyDeviceReset(); }; diff --git a/gfx/ipc/moz.build b/gfx/ipc/moz.build index ff3a81228..309681444 100644 --- a/gfx/ipc/moz.build +++ b/gfx/ipc/moz.build @@ -70,7 +70,6 @@ IPDL_SOURCES = [ LOCAL_INCLUDES += [ '/dom/ipc', - '/toolkit/crashreporter', '/xpcom/threads', ] |