Bug 1627482 - Fix non-unified build errors in gfx/ipc. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D69732

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2020-04-05 03:50:33 +00:00
Родитель 22d1a37a79
Коммит 137d2e50d3
8 изменённых файлов: 40 добавлений и 14 удалений

Просмотреть файл

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GPUChild.h"
#include "gfxConfig.h"
#include "gfxPlatform.h"
#include "GPUProcessHost.h"
#include "GPUProcessManager.h"
#include "VRProcessManager.h"

Просмотреть файл

@ -6,6 +6,8 @@
#include "GPUProcessHost.h"
#include "chrome/common/process_watcher.h"
#include "gfxPlatform.h"
#include "mozilla/gfx/GPUChild.h"
#include "mozilla/gfx/Logging.h"
#include "mozilla/Preferences.h"
#include "mozilla/StaticPrefs_layers.h"

Просмотреть файл

@ -6,6 +6,7 @@
#include "GPUProcessManager.h"
#include "gfxConfig.h"
#include "GPUProcessHost.h"
#include "GPUProcessListener.h"
#include "mozilla/MemoryReportingProcess.h"
@ -17,9 +18,13 @@
#include "mozilla/StaticPrefs_media.h"
#include "mozilla/RemoteDecoderManagerChild.h"
#include "mozilla/RemoteDecoderManagerParent.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/gfx/GPUChild.h"
#include "mozilla/layers/APZCTreeManagerChild.h"
#include "mozilla/layers/APZInputBridgeChild.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/CompositorBridgeParent.h"
#include "mozilla/layers/CompositorManagerChild.h"
#include "mozilla/layers/CompositorManagerParent.h"
@ -364,8 +369,8 @@ void GPUProcessManager::OnProcessLaunchComplete(GPUProcessHost* aHost) {
mGPUChild = mProcess->GetActor();
mProcessToken = mProcess->GetProcessToken();
Endpoint<PVsyncBridgeParent> vsyncParent;
Endpoint<PVsyncBridgeChild> vsyncChild;
ipc::Endpoint<PVsyncBridgeParent> vsyncParent;
ipc::Endpoint<PVsyncBridgeChild> vsyncChild;
nsresult rv = PVsyncBridge::CreateEndpoints(mGPUChild->OtherPid(),
base::GetCurrentProcId(),
&vsyncParent, &vsyncChild);
@ -789,7 +794,7 @@ RefPtr<CompositorSession> GPUProcessManager::CreateRemoteSession(
const CompositorOptions& aOptions, bool aUseExternalSurfaceSize,
const gfx::IntSize& aSurfaceSize) {
#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING
CompositorWidgetInitData initData;
widget::CompositorWidgetInitData initData;
aWidget->GetCompositorWidgetInitData(&initData);
RefPtr<CompositorBridgeChild> child =
@ -803,11 +808,11 @@ RefPtr<CompositorSession> GPUProcessManager::CreateRemoteSession(
RefPtr<CompositorVsyncDispatcher> dispatcher =
aWidget->GetCompositorVsyncDispatcher();
RefPtr<CompositorWidgetVsyncObserver> observer =
new CompositorWidgetVsyncObserver(mVsyncBridge, aRootLayerTreeId);
RefPtr<widget::CompositorWidgetVsyncObserver> observer =
new widget::CompositorWidgetVsyncObserver(mVsyncBridge, aRootLayerTreeId);
CompositorWidgetChild* widget =
new CompositorWidgetChild(dispatcher, observer, initData);
widget::CompositorWidgetChild* widget =
new widget::CompositorWidgetChild(dispatcher, observer, initData);
if (!child->SendPCompositorWidgetConstructor(widget, initData)) {
return nullptr;
}
@ -1122,10 +1127,10 @@ class GPUMemoryReporter : public MemoryReportingProcess {
return false;
}
bool SendRequestMemoryReport(const uint32_t& aGeneration,
const bool& aAnonymize,
const bool& aMinimizeMemoryUsage,
const Maybe<FileDescriptor>& aDMDFile) override {
bool SendRequestMemoryReport(
const uint32_t& aGeneration, const bool& aAnonymize,
const bool& aMinimizeMemoryUsage,
const Maybe<ipc::FileDescriptor>& aDMDFile) override {
GPUChild* child = GetChild();
if (!child) {
return false;

Просмотреть файл

@ -6,7 +6,14 @@
#include "InProcessCompositorSession.h"
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/CompositorBridgeParent.h"
#include "mozilla/layers/CompositorManagerChild.h"
#include "mozilla/layers/CompositorManagerParent.h"
#include "mozilla/layers/IAPZCTreeManager.h"
#include "mozilla/widget/CompositorWidget.h"
#include "mozilla/widget/PlatformWidgetTypes.h"
#include "nsBaseWidget.h"
namespace mozilla {
@ -19,7 +26,7 @@ InProcessCompositorSession::InProcessCompositorSession(
aParent->RootLayerTreeId()),
mCompositorBridgeParent(aParent),
mCompositorWidget(aCompositorWidget) {
GPUProcessManager::Get()->RegisterInProcessSession(this);
gfx::GPUProcessManager::Get()->RegisterInProcessSession(this);
}
/* static */
@ -28,7 +35,7 @@ RefPtr<InProcessCompositorSession> InProcessCompositorSession::Create(
const LayersId& aRootLayerTreeId, CSSToLayoutDeviceScale aScale,
const CompositorOptions& aOptions, bool aUseExternalSurfaceSize,
const gfx::IntSize& aSurfaceSize, uint32_t aNamespace) {
CompositorWidgetInitData initData;
widget::CompositorWidgetInitData initData;
aWidget->GetCompositorWidgetInitData(&initData);
RefPtr<CompositorWidget> widget =
@ -83,7 +90,7 @@ void InProcessCompositorSession::Shutdown() {
mCompositorBridgeChild = nullptr;
mCompositorBridgeParent = nullptr;
mCompositorWidget = nullptr;
GPUProcessManager::Get()->UnregisterInProcessSession(this);
gfx::GPUProcessManager::Get()->UnregisterInProcessSession(this);
}
} // namespace layers

Просмотреть файл

@ -10,10 +10,13 @@
#include "mozilla/gfx/Point.h"
#include "Units.h"
class nsIWidget;
namespace mozilla {
namespace layers {
class CompositorOptions;
class LayerManager;
// A CompositorSession where both the child and parent CompositorBridge reside
// in the same process.

Просмотреть файл

@ -5,9 +5,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "RemoteCompositorSession.h"
#include "gfxPlatform.h"
#include "mozilla/VsyncDispatcher.h"
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/layers/APZChild.h"
#include "mozilla/layers/APZCTreeManagerChild.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/Unused.h"
#include "nsBaseWidget.h"
#if defined(MOZ_WIDGET_ANDROID)

Просмотреть файл

@ -10,9 +10,13 @@
#include "mozilla/gfx/Point.h"
#include "Units.h"
class nsIWidget;
namespace mozilla {
namespace layers {
class APZCTreeManagerChild;
class RemoteCompositorSession final : public CompositorSession {
public:
RemoteCompositorSession(nsBaseWidget* aWidget, CompositorBridgeChild* aChild,

Просмотреть файл

@ -6,6 +6,7 @@
#include "VsyncBridgeChild.h"
#include "VsyncIOThreadHolder.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/gfx/GPUProcessManager.h"
namespace mozilla {
namespace gfx {