Bug 1379920 - Fix unified build error. r=nical draft
authorMorris Tseng <mtseng@mozilla.com>
Tue, 18 Jul 2017 16:51:53 +0800
changeset 612083 8bf97e88c71257e645b09f4adfd19c31e0aad011
parent 611714 eb1d92b2b6a4161492561250f51bae5bafeda68a
child 612084 cdbb8acfc4b7ad2d6ffac1dac7dc339fbce821ab
push id69379
push userbmo:mtseng@mozilla.com
push dateThu, 20 Jul 2017 09:19:49 +0000
reviewersnical
bugs1379920
milestone56.0a1
Bug 1379920 - Fix unified build error. r=nical MozReview-Commit-ID: Dx50fOh737p
gfx/layers/ImageLayers.cpp
gfx/layers/apz/src/AndroidDynamicToolbarAnimator.cpp
gfx/layers/composite/TextureHost.cpp
gfx/layers/ipc/CompositorManagerChild.cpp
gfx/layers/mlgpu/FrameBuilder.cpp
gfx/layers/mlgpu/RenderViewMLGPU.cpp
gfx/layers/mlgpu/SharedBufferMLGPU.h
gfx/layers/wr/WebRenderBridgeParent.cpp
gfx/layers/wr/WebRenderUserData.cpp
gfx/layers/wr/WebRenderUserData.h
--- a/gfx/layers/ImageLayers.cpp
+++ b/gfx/layers/ImageLayers.cpp
@@ -28,17 +28,17 @@ void ImageLayer::SetContainer(ImageConta
 
 void ImageLayer::ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface)
 {
   gfx::Matrix4x4 local = GetLocalTransform();
 
   // Snap image edges to pixel boundaries
   gfxRect sourceRect(0, 0, 0, 0);
   if (mContainer) {
-    sourceRect.SizeTo(SizeDouble(mContainer->GetCurrentSize()));
+    sourceRect.SizeTo(gfx::SizeDouble(mContainer->GetCurrentSize()));
   }
   // Snap our local transform first, and snap the inherited transform as well.
   // This makes our snapping equivalent to what would happen if our content
   // was drawn into a PaintedLayer (gfxContext would snap using the local
   // transform, then we'd snap again when compositing the PaintedLayer).
   mEffectiveTransform =
       SnapTransform(local, sourceRect, nullptr) *
       SnapTransformTranslation(aTransformToSurface, nullptr);
--- a/gfx/layers/apz/src/AndroidDynamicToolbarAnimator.cpp
+++ b/gfx/layers/apz/src/AndroidDynamicToolbarAnimator.cpp
@@ -8,17 +8,19 @@
 
 #include <cmath>
 #include "FrameMetrics.h"
 #include "gfxPrefs.h"
 #include "mozilla/EventForwards.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Types.h"
+#include "mozilla/layers/APZCTreeManager.h"
 #include "mozilla/layers/APZThreadUtils.h"
+#include "mozilla/layers/AsyncCompositionManager.h"
 #include "mozilla/layers/CompositorBridgeParent.h"
 #include "mozilla/layers/CompositorOGL.h"
 #include "mozilla/layers/CompositorThread.h"
 #include "mozilla/layers/UiCompositorControllerMessageTypes.h"
 #include "mozilla/layers/UiCompositorControllerParent.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/Move.h"
 #include "mozilla/Unused.h"
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -93,17 +93,17 @@ public:
   wr::MaybeExternalImageId mExternalImageId;
 };
 
 static bool
 WrapWithWebRenderTextureHost(ISurfaceAllocator* aDeallocator,
                              LayersBackend aBackend,
                              TextureFlags aFlags)
 {
-  if (!gfxVars::UseWebRender() ||
+  if (!gfx::gfxVars::UseWebRender() ||
       (aFlags & TextureFlags::SNAPSHOT) ||
       (aBackend != LayersBackend::LAYERS_WR) ||
       (!aDeallocator->UsesImageBridge() && !aDeallocator->AsCompositorBridgeParentBase())) {
     return false;
   }
   return true;
 }
 
--- a/gfx/layers/ipc/CompositorManagerChild.cpp
+++ b/gfx/layers/ipc/CompositorManagerChild.cpp
@@ -1,17 +1,19 @@
 /* -*- Mode: C++; tab-width: 20; 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/. */
 
 #include "mozilla/layers/CompositorManagerChild.h"
+#include "gfxPrefs.h"
 #include "mozilla/layers/CompositorBridgeChild.h"
 #include "mozilla/layers/CompositorManagerParent.h"
 #include "mozilla/layers/CompositorThread.h"
+#include "mozilla/gfx/gfxVars.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/dom/ContentChild.h"   // for ContentChild
 #include "mozilla/dom/TabChild.h"       // for TabChild
 #include "mozilla/dom/TabGroup.h"       // for TabGroup
 #include "VsyncSource.h"
 
 namespace mozilla {
 namespace layers {
@@ -260,29 +262,29 @@ CompositorManagerChild::GetSpecificMessa
 
 void
 CompositorManagerChild::SetReplyTimeout()
 {
 #ifndef DEBUG
   // Add a timeout for release builds to kill GPU process when it hangs.
   // Don't apply timeout when using web render as it tend to timeout frequently.
   if (XRE_IsParentProcess() &&
-      GPUProcessManager::Get()->GetGPUChild() &&
-      !gfxVars::UseWebRender()) {
+      gfx::GPUProcessManager::Get()->GetGPUChild() &&
+      !gfx::gfxVars::UseWebRender()) {
     int32_t timeout = gfxPrefs::GPUProcessIPCReplyTimeoutMs();
     SetReplyTimeoutMs(timeout);
   }
 #endif
 }
 
 bool
 CompositorManagerChild::ShouldContinueFromReplyTimeout()
 {
   if (XRE_IsParentProcess()) {
     gfxCriticalNote << "Killing GPU process due to IPC reply timeout";
-    MOZ_DIAGNOSTIC_ASSERT(GPUProcessManager::Get()->GetGPUChild());
-    GPUProcessManager::Get()->KillProcess();
+    MOZ_DIAGNOSTIC_ASSERT(gfx::GPUProcessManager::Get()->GetGPUChild());
+    gfx::GPUProcessManager::Get()->KillProcess();
   }
   return false;
 }
 
 } // namespace layers
 } // namespace mozilla
--- a/gfx/layers/mlgpu/FrameBuilder.cpp
+++ b/gfx/layers/mlgpu/FrameBuilder.cpp
@@ -4,16 +4,17 @@
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FrameBuilder.h"
 #include "ContainerLayerMLGPU.h"
 #include "GeckoProfiler.h"              // for profiler_*
 #include "LayerMLGPU.h"
 #include "LayerManagerMLGPU.h"
 #include "MaskOperation.h"
+#include "MLGDevice.h"
 #include "RenderPassMLGPU.h"
 #include "RenderViewMLGPU.h"
 #include "mozilla/gfx/Polygon.h"
 #include "mozilla/layers/BSPTree.h"
 #include "mozilla/layers/LayersHelpers.h"
 
 namespace mozilla {
 namespace layers {
--- a/gfx/layers/mlgpu/RenderViewMLGPU.cpp
+++ b/gfx/layers/mlgpu/RenderViewMLGPU.cpp
@@ -7,16 +7,17 @@
 #include "ContainerLayerMLGPU.h"
 #include "FrameBuilder.h"
 #include "gfxPrefs.h"
 #include "LayersHelpers.h"
 #include "LayersLogging.h"
 #include "MLGDevice.h"
 #include "RenderPassMLGPU.h"
 #include "ShaderDefinitionsMLGPU.h"
+#include "UnitTransforms.h"
 #include "UtilityMLGPU.h"
 
 namespace mozilla {
 namespace layers {
 
 using namespace gfx;
 
 RenderViewMLGPU::RenderViewMLGPU(FrameBuilder* aBuilder,
--- a/gfx/layers/mlgpu/SharedBufferMLGPU.h
+++ b/gfx/layers/mlgpu/SharedBufferMLGPU.h
@@ -2,16 +2,17 @@
 * 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/. */
 
 #ifndef mozilla_gfx_layers_mlgpu_SharedBufferMLGPU_h
 #define mozilla_gfx_layers_mlgpu_SharedBufferMLGPU_h
 
 #include "ShaderDefinitionsMLGPU.h"
+#include "MLGDevice.h"
 #include "MLGDeviceTypes.h"
 #include "StagingBuffer.h"
 #include "mozilla/gfx/Logging.h"
 
 namespace mozilla {
 namespace layers {
 
 class MLGBuffer;
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -3,16 +3,17 @@
 /* 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/. */
 
 #include "mozilla/layers/WebRenderBridgeParent.h"
 
 #include "apz/src/AsyncPanZoomController.h"
 #include "CompositableHost.h"
+#include "gfxEnv.h"
 #include "gfxPrefs.h"
 #include "GeckoProfiler.h"
 #include "GLContext.h"
 #include "GLContextProvider.h"
 #include "mozilla/Range.h"
 #include "mozilla/layers/AnimationHelper.h"
 #include "mozilla/layers/APZCTreeManager.h"
 #include "mozilla/layers/Compositor.h"
--- a/gfx/layers/wr/WebRenderUserData.cpp
+++ b/gfx/layers/wr/WebRenderUserData.cpp
@@ -1,14 +1,19 @@
 /* -*- Mode: C++; tab-width: 2; 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/. */
 
 #include "WebRenderUserData.h"
+
+#include "mozilla/layers/ImageClient.h"
+#include "mozilla/layers/WebRenderBridgeChild.h"
+#include "mozilla/layers/WebRenderLayerManager.h"
+#include "mozilla/layers/WebRenderMessages.h"
 #include "nsDisplayListInvalidation.h"
 
 namespace mozilla {
 namespace layers {
 
 WebRenderBridgeChild*
 WebRenderUserData::WrBridge() const
 {
@@ -86,18 +91,18 @@ WebRenderImageData::GetImageClient()
 }
 
 void
 WebRenderImageData::CreateAsyncImageWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
                                                       ImageContainer* aContainer,
                                                       const StackingContextHelper& aSc,
                                                       const LayerRect& aBounds,
                                                       const LayerRect& aSCBounds,
-                                                      const Matrix4x4& aSCTransform,
-                                                      const MaybeIntSize& aScaleToSize,
+                                                      const gfx::Matrix4x4& aSCTransform,
+                                                      const gfx::MaybeIntSize& aScaleToSize,
                                                       const wr::ImageRendering& aFilter,
                                                       const wr::MixBlendMode& aMixBlendMode)
 {
   MOZ_ASSERT(aContainer->IsAsync());
   if (!mPipelineId) {
     // Alloc async image pipeline id.
     mPipelineId = Some(WrBridge()->GetCompositorBridgeChild()->GetNextPipelineId());
     WrBridge()->AddPipelineIdForAsyncCompositable(mPipelineId.ref(),
--- a/gfx/layers/wr/WebRenderUserData.h
+++ b/gfx/layers/wr/WebRenderUserData.h
@@ -3,16 +3,17 @@
  * 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/. */
 
 #ifndef GFX_WEBRENDERUSERDATA_H
 #define GFX_WEBRENDERUSERDATA_H
 
 #include "mozilla/layers/StackingContextHelper.h"
 #include "mozilla/webrender/WebRenderAPI.h"
+#include "nsAutoPtr.h"
 
 class nsDisplayItemGeometry;
 
 namespace mozilla {
 namespace layers {
 class ImageClient;
 class ImageContainer;
 class WebRenderBridgeChild;