Bug 1351783 part 1 - Add includes for unified build issues. r=kats
authorRyan Hunt <rhunt@eqrion.net>
Mon, 05 Jun 2017 18:03:02 -0500
changeset 417384 81716a06ec30752cdefe60884eb7831a975791c4
parent 417383 abb82362d85b137b26ff42cb261dead6f0ce2ac8
child 417385 887a8e96eeda59abc75f273304314a5a42414ea9
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1351783
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1351783 part 1 - Add includes for unified build issues. r=kats MozReview-Commit-ID: D57bbW4pmPZ
gfx/layers/basic/BasicDisplayItemLayer.cpp
gfx/layers/client/ClientPaintedLayer.h
gfx/layers/composite/TextRenderer.h
gfx/layers/mlgpu/ContainerLayerMLGPU.cpp
gfx/layers/mlgpu/ContainerLayerMLGPU.h
gfx/layers/mlgpu/FrameBuilder.cpp
gfx/layers/wr/WebRenderDisplayItemLayer.cpp
gfx/thebes/gfxTextRun.h
--- a/gfx/layers/basic/BasicDisplayItemLayer.cpp
+++ b/gfx/layers/basic/BasicDisplayItemLayer.cpp
@@ -12,16 +12,17 @@
 #include "gfx2DGlue.h"
 #include "mozilla/mozalloc.h"           // for operator new
 #include "nsCOMPtr.h"                   // for already_AddRefed
 #include "nsDebug.h"                    // for NS_ASSERTION
 #include "nsISupportsImpl.h"            // for Layer::AddRef, etc
 #include "nsRect.h"                     // for mozilla::gfx::IntRect
 #include "nsRegion.h"                   // for nsIntRegion
 #include "mozilla/gfx/PathHelpers.h"
+#include "mozilla/gfx/Helpers.h"
 #include "nsDisplayList.h"              // for nsDisplayItem
 #include "nsCaret.h"
 
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace layers {
 
--- a/gfx/layers/client/ClientPaintedLayer.h
+++ b/gfx/layers/client/ClientPaintedLayer.h
@@ -115,17 +115,17 @@ protected:
   void PaintThebes(nsTArray<ReadbackProcessor::Update>* aReadbackUpdates);
   void RecordThebes();
   bool CanRecordLayer(ReadbackProcessor* aReadback);
   bool HasMaskLayers();
   bool EnsureContentClient();
   uint32_t GetPaintFlags();
   void UpdateContentClient(PaintState& aState);
   bool UpdatePaintRegion(PaintState& aState);
-  void PaintOffMainThread(DrawTargetCapture* aCapture);
+  void PaintOffMainThread(gfx::DrawTargetCapture* aCapture);
   already_AddRefed<gfx::DrawTargetCapture> CapturePaintedContent();
 
   virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
   void DestroyBackBuffer()
   {
     mContentClient = nullptr;
   }
--- a/gfx/layers/composite/TextRenderer.h
+++ b/gfx/layers/composite/TextRenderer.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_TextRenderer_H
 #define GFX_TextRenderer_H
 
 #include "mozilla/EnumeratedArray.h"
 #include "mozilla/gfx/2D.h"
+#include "mozilla/UniquePtr.h"
 #include "nsISupportsImpl.h"
 #include <string>
 
 namespace mozilla {
 namespace layers {
 
 class Compositor;
 class TextureSource;
--- a/gfx/layers/mlgpu/ContainerLayerMLGPU.cpp
+++ b/gfx/layers/mlgpu/ContainerLayerMLGPU.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 "ContainerLayerMLGPU.h"
 #include "gfxPrefs.h"
 #include "LayersLogging.h"
+#include "LayerManagerMLGPU.h"
 #include "MLGDevice.h"
+#include "mozilla/gfx/Types.h"
 
 namespace mozilla {
 namespace layers {
 
 ContainerLayerMLGPU::ContainerLayerMLGPU(LayerManagerMLGPU* aManager)
   : ContainerLayer(aManager, nullptr)
   , LayerMLGPU(aManager)
 {
@@ -33,17 +35,17 @@ ContainerLayerMLGPU::OnPrepareToRender(F
 
   mTargetOffset = GetIntermediateSurfaceRect().TopLeft().ToUnknownPoint();
   mTargetSize = GetIntermediateSurfaceRect().Size().ToUnknownSize();
 
   if (mRenderTarget && mRenderTarget->GetSize() != mTargetSize) {
     mRenderTarget = nullptr;
   }
 
-  IntRect viewport(IntPoint(0, 0), mTargetSize);
+  gfx::IntRect viewport(gfx::IntPoint(0, 0), mTargetSize);
   if (!mRenderTarget || !gfxPrefs::AdvancedLayersUseInvalidation()) {
     // Fine-grained invalidation is disabled, invalidate everything.
     mInvalidRect = viewport;
   } else {
     // Clamp the invalid rect to the viewport.
     mInvalidRect = mInvalidRect.Intersect(viewport);
   }
   return true;
@@ -65,38 +67,38 @@ ContainerLayerMLGPU::UpdateRenderTarget(
   return mRenderTarget;
 }
 
 void
 ContainerLayerMLGPU::SetInvalidCompositeRect(const gfx::IntRect& aRect)
 {
   // For simplicity we only track the bounds of the invalid area, since regions
   // are expensive. We can adjust this in the future if needed.
-  IntRect bounds = aRect;
+  gfx::IntRect bounds = aRect;
   bounds.MoveBy(-GetTargetOffset());
 
   // Note we add the bounds to the invalid rect from the last frame, since we
   // only clear the area that we actually paint.
-  if (Maybe<IntRect> result = mInvalidRect.SafeUnion(bounds)) {
+  if (Maybe<gfx::IntRect> result = mInvalidRect.SafeUnion(bounds)) {
     mInvalidRect = result.value();
   } else {
-    mInvalidRect = IntRect(IntPoint(0, 0), GetTargetSize());
+    mInvalidRect = gfx::IntRect(gfx::IntPoint(0, 0), GetTargetSize());
   }
 }
 
 void
 ContainerLayerMLGPU::ClearCachedResources()
 {
   mRenderTarget = nullptr;
 }
 
 bool
 ContainerLayerMLGPU::IsContentOpaque()
 {
-  if (GetMixBlendMode() != CompositionOp::OP_OVER) {
+  if (GetMixBlendMode() != gfx::CompositionOp::OP_OVER) {
     // We need to read from what's underneath us, so we consider our content to
     // be not opaque.
     return false;
   }
   return LayerMLGPU::IsContentOpaque();
 }
 
 } // namespace layers
--- a/gfx/layers/mlgpu/ContainerLayerMLGPU.h
+++ b/gfx/layers/mlgpu/ContainerLayerMLGPU.h
@@ -2,20 +2,23 @@
 * 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_ContainerLayerMLGPU_h
 #define mozilla_gfx_layers_mlgpu_ContainerLayerMLGPU_h
 
 #include "LayerMLGPU.h"
+#include "MLGDeviceTypes.h"
 
 namespace mozilla {
 namespace layers {
 
+class MLGDevice;
+
 class ContainerLayerMLGPU final : public ContainerLayer
                                 , public LayerMLGPU
 {
 public:
   explicit ContainerLayerMLGPU(LayerManagerMLGPU* aManager);
   ~ContainerLayerMLGPU() override;
 
   MOZ_LAYER_DECL_NAME("ContainerLayerMLGPU", TYPE_CONTAINER)
--- a/gfx/layers/mlgpu/FrameBuilder.cpp
+++ b/gfx/layers/mlgpu/FrameBuilder.cpp
@@ -6,16 +6,18 @@
 #include "FrameBuilder.h"
 #include "ContainerLayerMLGPU.h"
 #include "GeckoProfiler.h"              // for profiler_*
 #include "LayerMLGPU.h"
 #include "LayerManagerMLGPU.h"
 #include "MaskOperation.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 {
 
 using namespace mlg;
 
 FrameBuilder::FrameBuilder(LayerManagerMLGPU* aManager, MLGSwapChain* aSwapChain)
@@ -58,17 +60,17 @@ FrameBuilder::Build()
   // affecting the invalid bounds are redrawn, even if not all are in the
   // precise region.
   const nsIntRegion& region = mSwapChain->GetBackBufferInvalidRegion();
 
   mWidgetRenderView = new RenderViewMLGPU(this, target, region);
 
   // Traverse the layer tree and assign each layer to tiles.
   {
-    Maybe<Polygon> geometry;
+    Maybe<gfx::Polygon> geometry;
     RenderTargetIntRect clip(0, 0, target->GetSize().width, target->GetSize().height);
 
     AssignLayer(mRoot->GetLayer(), mWidgetRenderView, clip, Move(geometry));
   }
 
   // Build the default mask buffer.
   {
     MaskInformation defaultMaskInfo(1.0f, false);
@@ -104,17 +106,17 @@ FrameBuilder::Render()
   // Render to all targets, front-to-back.
   mWidgetRenderView->Render();
 }
 
 void
 FrameBuilder::AssignLayer(Layer* aLayer,
                           RenderViewMLGPU* aView,
                           const RenderTargetIntRect& aClipRect,
-                          Maybe<Polygon>&& aGeometry)
+                          Maybe<gfx::Polygon>&& aGeometry)
 {
   LayerMLGPU* layer = aLayer->AsHostLayer()->AsLayerMLGPU();
 
   if (ContainerLayer* container = aLayer->AsContainerLayer()) {
     // This returns false if we don't need to (or can't) process the layer any
     // further. This always returns false for non-leaf ContainerLayers.
     if (!ProcessContainerLayer(container, aView, aClipRect, aGeometry)) {
       return;
@@ -151,18 +153,18 @@ FrameBuilder::ProcessContainerLayer(Cont
   if (isFirstVisit && !layer->PrepareToRender(this, aClipRect)) {
     return false;
   }
 
   // If the container is not part of the invalid region, we don't draw it
   // or traverse it. Note that we do not pass the geometry here. Otherwise
   // we could decide the particular split is not visible, and because of the
   // check above, never bother traversing the container again.
-  IntRect boundingBox = layer->GetClippedBoundingBox(aView, Nothing());
-  const IntRect& invalidRect = aView->GetInvalidRect();
+  gfx::IntRect boundingBox = layer->GetClippedBoundingBox(aView, Nothing());
+  const gfx::IntRect& invalidRect = aView->GetInvalidRect();
   if (boundingBox.IsEmpty() || !invalidRect.Intersects(boundingBox)) {
     return false;
   }
 
   if (!aContainer->UseIntermediateSurface()) {
     // In case the layer previously required an intermediate surface, we
     // clear any intermediate render targets here.
     layer->ClearCachedResources();
@@ -186,17 +188,17 @@ FrameBuilder::ProcessContainerLayer(Cont
   }
   return true;
 }
 
 void
 FrameBuilder::ProcessChildList(ContainerLayer* aContainer,
                                RenderViewMLGPU* aView,
                                const RenderTargetIntRect& aParentClipRect,
-                               const Maybe<Polygon>& aParentGeometry)
+                               const Maybe<gfx::Polygon>& aParentGeometry)
 {
   nsTArray<LayerPolygon> polygons =
     aContainer->SortChildrenBy3DZOrder(ContainerLayer::SortMode::WITH_GEOMETRY);
 
   // Visit layers in front-to-back order.
   for (auto iter = polygons.rbegin(); iter != polygons.rend(); iter++) {
     LayerPolygon& entry = *iter;
     Layer* child = entry.layer;
@@ -204,17 +206,17 @@ FrameBuilder::ProcessChildList(Container
       continue;
     }
 
     RenderTargetIntRect clip = child->CalculateScissorRect(aParentClipRect);
     if (clip.IsEmpty()) {
       continue;
     }
 
-    Maybe<Polygon> geometry;
+    Maybe<gfx::Polygon> geometry;
     if (aParentGeometry && entry.geometry) {
       // Both parent and child are split.
       geometry = Some(aParentGeometry->ClipPolygon(*entry.geometry));
     } else if (aParentGeometry) {
       geometry = aParentGeometry;
     } else if (entry.geometry) {
       geometry = Move(entry.geometry);
     }
@@ -238,24 +240,24 @@ FrameBuilder::AddLayerToConstantBuffer(I
   LayerConstants* info = AllocateLayerInfo(aItem);
   if (!info) {
     return false;
   }
 
   // Note we do not use GetEffectiveTransformForBuffer, since we calculate
   // the correct scaling when we build texture coordinates.
   Layer* baseLayer = layer->GetLayer();
-  const Matrix4x4& transform = baseLayer->GetEffectiveTransform();
+  const gfx::Matrix4x4& transform = baseLayer->GetEffectiveTransform();
 
   memcpy(&info->transform, &transform._11, 64);
-  info->clipRect = Rect(layer->GetComputedClipRect().ToUnknownRect());
+  info->clipRect = gfx::Rect(layer->GetComputedClipRect().ToUnknownRect());
   info->maskIndex = 0;
   if (MaskOperation* op = layer->GetMask()) {
     // Note: we use 0 as an invalid index, and so indices are offset by 1.
-    Rect rect = op->ComputeMaskRect(baseLayer);
+    gfx::Rect rect = op->ComputeMaskRect(baseLayer);
     AddMaskRect(rect, &info->maskIndex);
   }
 
   if (aItem.geometry) {
     mLayerBufferMap.Put(layer, aItem.layerIndex);
   }
   return true;
 }
--- a/gfx/layers/wr/WebRenderDisplayItemLayer.cpp
+++ b/gfx/layers/wr/WebRenderDisplayItemLayer.cpp
@@ -117,17 +117,17 @@ WebRenderDisplayItemLayer::PushItemAsBlo
       LayoutDeviceRect::FromAppUnits(mItem->GetBounds(mBuilder, &snap), appUnitsPerDevPixel),
       PixelCastJustification::WebRenderHasUnitResolution);
   LayerIntSize imageSize = RoundedToInt(bounds.Size());
   LayerRect imageRect;
   imageRect.SizeTo(LayerSize(imageSize));
 
   RefPtr<gfx::DrawEventRecorderMemory> recorder = MakeAndAddRef<gfx::DrawEventRecorderMemory>();
   RefPtr<gfx::DrawTarget> dummyDt =
-    gfx::Factory::CreateDrawTarget(gfx::BackendType::SKIA, IntSize(1, 1), gfx::SurfaceFormat::B8G8R8X8);
+    gfx::Factory::CreateDrawTarget(gfx::BackendType::SKIA, gfx::IntSize(1, 1), gfx::SurfaceFormat::B8G8R8X8);
   RefPtr<gfx::DrawTarget> dt = gfx::Factory::CreateRecordingDrawTarget(recorder, dummyDt, imageSize.ToUnknownSize());
   LayerPoint offset = ViewAs<LayerPixel>(
       LayoutDevicePoint::FromAppUnits(mItem->ToReferenceFrame(), appUnitsPerDevPixel),
       PixelCastJustification::WebRenderHasUnitResolution);
 
   {
     dt->ClearRect(imageRect.ToUnknownRect());
     RefPtr<gfxContext> context = gfxContext::CreateOrNull(dt, offset.ToUnknownPoint());
--- a/gfx/thebes/gfxTextRun.h
+++ b/gfx/thebes/gfxTextRun.h
@@ -2,30 +2,35 @@
  * vim: set ts=4 et sw=4 tw=80:
  * 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 GFX_TEXTRUN_H
 #define GFX_TEXTRUN_H
 
+#include <stdint.h>
+
 #include "gfxTypes.h"
-#include "nsString.h"
 #include "gfxPoint.h"
 #include "gfxFont.h"
 #include "gfxFontConstants.h"
-#include "nsTArray.h"
 #include "gfxSkipChars.h"
 #include "gfxPlatform.h"
 #include "mozilla/MemoryReporting.h"
+#include "mozilla/RefPtr.h"
+#include "nsPoint.h"
+#include "nsString.h"
+#include "nsTArray.h"
+#include "nsTextFrameUtils.h"
 #include "DrawMode.h"
 #include "harfbuzz/hb.h"
 #include "nsUnicodeScriptCodes.h"
 #include "nsColor.h"
-#include "nsTextFrameUtils.h"
+#include "X11UndefineNone.h"
 
 #ifdef DEBUG
 #include <stdio.h>
 #endif
 
 class gfxContext;
 class gfxFontGroup;
 class gfxUserFontEntry;