diff --git a/gfx/layers/Compositor.cpp b/gfx/layers/Compositor.cpp index 72ad5c058e2c..69b9ccef3276 100644 --- a/gfx/layers/Compositor.cpp +++ b/gfx/layers/Compositor.cpp @@ -4,10 +4,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/Compositor.h" -#include "mozilla/layers/Effects.h" -#include "mozilla/layers/CompositorParent.h" +#include "base/message_loop.h" // for MessageLoop +#include "mozilla/layers/CompositorParent.h" // for CompositorParent +#include "mozilla/layers/Effects.h" // for Effect, EffectChain, etc +#include "mozilla/mozalloc.h" // for operator delete, etc namespace mozilla { +namespace gfx { +class Matrix4x4; +} + namespace layers { /* static */ LayersBackend Compositor::sBackend = LAYERS_NONE; diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index eff6b2d478c7..fdd2581e82b9 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -6,12 +6,17 @@ #ifndef MOZILLA_GFX_COMPOSITOR_H #define MOZILLA_GFX_COMPOSITOR_H -#include "mozilla/gfx/Rect.h" -#include "mozilla/gfx/Matrix.h" -#include "gfxMatrix.h" -#include "Layers.h" -#include "mozilla/RefPtr.h" -#include "mozilla/layers/CompositorTypes.h" +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "Units.h" // for ScreenPoint +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for TemporaryRef, RefCounted +#include "mozilla/gfx/Point.h" // for IntSize, Point +#include "mozilla/gfx/Rect.h" // for Rect, IntRect +#include "mozilla/gfx/Types.h" // for Float +#include "mozilla/layers/CompositorTypes.h" // for DiagnosticTypes, etc +#include "mozilla/layers/LayersTypes.h" // for LayersBackend +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc /** * Different elements of a web pages are rendered into separate "layers" before @@ -100,10 +105,12 @@ class gfxContext; class nsIWidget; +struct gfxMatrix; +struct nsIntSize; namespace mozilla { namespace gfx { -class DrawTarget; +class Matrix4x4; } namespace layers { diff --git a/gfx/layers/CompositorTypes.h b/gfx/layers/CompositorTypes.h index e1b106a4bd61..227f541dd2ed 100644 --- a/gfx/layers/CompositorTypes.h +++ b/gfx/layers/CompositorTypes.h @@ -6,9 +6,10 @@ #ifndef MOZILLA_LAYERS_COMPOSITORTYPES_H #define MOZILLA_LAYERS_COMPOSITORTYPES_H -#include "LayersTypes.h" -#include "nsXULAppAPI.h" - +#include // for uint32_t +#include // for int32_t +#include "LayersTypes.h" // for LayersBackend, etc +#include "nsXULAppAPI.h" // for GeckoProcessType, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/CopyableCanvasLayer.cpp b/gfx/layers/CopyableCanvasLayer.cpp index 70c8ea200ca8..6569226b6a5b 100644 --- a/gfx/layers/CopyableCanvasLayer.cpp +++ b/gfx/layers/CopyableCanvasLayer.cpp @@ -3,20 +3,24 @@ * 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/PLayerTransactionParent.h" +#include "BasicLayersImpl.h" // for FillWithMask, etc #include "CopyableCanvasLayer.h" -#include "BasicLayersImpl.h" -#include "gfxImageSurface.h" -#include "GLContext.h" -#include "gfxUtils.h" -#include "gfxPlatform.h" -#include "mozilla/Preferences.h" -#include "SurfaceStream.h" -#include "SharedSurfaceGL.h" -#include "SharedSurfaceEGL.h" -#include "GeckoProfiler.h" - -#include "nsXULAppAPI.h" +#include "GLContext.h" // for GLContext +#include "GLScreenBuffer.h" // for GLScreenBuffer +#include "SharedSurface.h" // for SharedSurface +#include "SharedSurfaceGL.h" // for SharedSurface_GL, etc +#include "SurfaceTypes.h" // for APITypeT, APITypeT::OpenGL, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPattern.h" // for gfxPattern, etc +#include "gfxPlatform.h" // for gfxPlatform, gfxImageFormat +#include "gfxRect.h" // for gfxRect +#include "gfxUtils.h" // for gfxUtils +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING, etc +#include "nsISupportsImpl.h" // for gfxContext::AddRef, etc +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize using namespace mozilla::gfx; using namespace mozilla::gl; diff --git a/gfx/layers/CopyableCanvasLayer.h b/gfx/layers/CopyableCanvasLayer.h index c94496872e62..629b6d5db9d9 100644 --- a/gfx/layers/CopyableCanvasLayer.h +++ b/gfx/layers/CopyableCanvasLayer.h @@ -6,18 +6,27 @@ #ifndef GFX_COPYABLECANVASLAYER_H #define GFX_COPYABLECANVASLAYER_H -#include "Layers.h" -#include "mozilla/layers/CanvasClient.h" -#include "mozilla/Preferences.h" - -#include "gfxPlatform.h" +#include // for uint32_t +#include "GLContext.h" // for GLContext +#include "Layers.h" // for CanvasLayer, etc +#include "gfxASurface.h" // for gfxASurface +#include "gfxContext.h" // for gfxContext, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPlatform.h" // for gfxImageFormat +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gfx; namespace mozilla { namespace layers { -class CanvasClient2D; class CanvasClientWebGL; /** diff --git a/gfx/layers/Effects.cpp b/gfx/layers/Effects.cpp index 474e5a0de801..d763fec336c3 100644 --- a/gfx/layers/Effects.cpp +++ b/gfx/layers/Effects.cpp @@ -4,8 +4,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "Effects.h" -#include "LayersLogging.h" -#include "nsPrintfCString.h" +#include "LayersLogging.h" // for AppendToString +#include "nsAString.h" +#include "nsPrintfCString.h" // for nsPrintfCString +#include "nsString.h" // for nsAutoCString using namespace mozilla::layers; diff --git a/gfx/layers/Effects.h b/gfx/layers/Effects.h index af7f6207086b..293981e43f2f 100644 --- a/gfx/layers/Effects.h +++ b/gfx/layers/Effects.h @@ -6,11 +6,17 @@ #ifndef MOZILLA_LAYERS_EFFECTS_H #define MOZILLA_LAYERS_EFFECTS_H -#include "mozilla/gfx/Matrix.h" -#include "mozilla/layers/Compositor.h" -#include "mozilla/layers/TextureHost.h" -#include "LayersLogging.h" -#include "mozilla/RefPtr.h" +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef, etc +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for Filter, etc +#include "mozilla/layers/CompositorTypes.h" // for EffectTypes, etc +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_HAVE_LOG +#include "mozilla/layers/TextureHost.h" // for CompositingRenderTarget, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nscore.h" // for nsACString namespace mozilla { namespace layers { diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index eb473f21a91a..0e7343ee3df6 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -6,11 +6,11 @@ #ifndef GFX_FRAMEMETRICS_H #define GFX_FRAMEMETRICS_H -#include "gfxPoint.h" -#include "gfxTypes.h" -#include "nsRect.h" -#include "mozilla/gfx/Rect.h" -#include "Units.h" +#include // for uint32_t, uint64_t +#include "Units.h" // for CSSRect, CSSPixel, etc +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/Rect.h" // for RoundedIn +#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor namespace mozilla { namespace layers { diff --git a/gfx/layers/GrallocImages.cpp b/gfx/layers/GrallocImages.cpp index e9eb6143d4eb..d8b3d63722cd 100644 --- a/gfx/layers/GrallocImages.cpp +++ b/gfx/layers/GrallocImages.cpp @@ -4,11 +4,11 @@ * 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/ImageBridgeChild.h" - -#include "nsDebug.h" -#include "ImageContainer.h" #include "GrallocImages.h" +#include // for size_t +#include // for int8_t, uint8_t, uint32_t, etc +#include "nsDebug.h" // for NS_WARNING, NS_PRECONDITION +#include "mozilla/layers/ImageBridgeChild.h" #include #include diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index e5a567d57110..411effd2f008 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -4,19 +4,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "mozilla/layers/ImageBridgeChild.h" - #include "ImageContainer.h" +#include // for memcpy, memset +#include "SharedTextureImage.h" // for SharedTextureImage +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxUtils.h" // for gfxUtils +#include "mozilla/RefPtr.h" // for TemporaryRef +#include "mozilla/ipc/CrossProcessMutex.h" // for CrossProcessMutex, etc +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/ImageBridgeChild.h" // for ImageBridgeChild +#include "mozilla/layers/ImageClient.h" // for ImageClient +#include "nsISupportsUtils.h" // for NS_IF_ADDREF +#ifdef MOZ_WIDGET_GONK #include "GrallocImages.h" -#include "mozilla/ipc/Shmem.h" -#include "mozilla/ipc/CrossProcessMutex.h" -#include "SharedTextureImage.h" -#include "gfxImageSurface.h" -#include "gfxSharedImageSurface.h" -#include "yuv_convert.h" -#include "gfxUtils.h" -#include "gfxPlatform.h" -#include "mozilla/layers/ImageClient.h" +#endif #ifdef XP_MACOSX #include "mozilla/gfx/QuartzSupport.h" @@ -39,6 +41,9 @@ using mozilla::gfx::SourceSurface; namespace mozilla { namespace layers { +class DataSourceSurface; +class SourceSurface; + int32_t Image::sSerialCounter = 0; already_AddRefed diff --git a/gfx/layers/ImageContainer.h b/gfx/layers/ImageContainer.h index 584b595480c9..f61dd330724b 100644 --- a/gfx/layers/ImageContainer.h +++ b/gfx/layers/ImageContainer.h @@ -6,14 +6,29 @@ #ifndef GFX_IMAGECONTAINER_H #define GFX_IMAGECONTAINER_H -#include "mozilla/Mutex.h" -#include "mozilla/ReentrantMonitor.h" -#include "gfxASurface.h" // for gfxImageFormat -#include "mozilla/layers/LayersTypes.h" // for LayersBackend -#include "mozilla/TimeStamp.h" -#include "ImageTypes.h" -#include "nsTArray.h" -#include "pratom.h" +#include // for uint32_t, uint8_t, uint64_t +#include // for int32_t +#include "GeckoProfilerFunc.h" // for TimeStamp +#include "ImageTypes.h" // for ImageFormat, etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Mutex.h" // for Mutex +#include "mozilla/ReentrantMonitor.h" // for ReentrantMonitorAutoEnter, etc +#include "mozilla/TimeStamp.h" // for TimeStamp +#include "mozilla/layers/LayersTypes.h" // for LayersBackend, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr, nsAutoArrayPtr, etc +#include "nsAutoRef.h" // for nsCountedRef +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for Image::Release, etc +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "nsTArray.h" // for nsTArray +#include "nsThreadUtils.h" // for NS_IsMainThread +#include "pratom.h" // for PR_ATOMIC_INCREMENT +class nsMainThreadSurfaceRef; #ifdef XP_WIN struct ID3D10Texture2D; @@ -26,9 +41,6 @@ typedef void* HANDLE; namespace mozilla { class CrossProcessMutex; -namespace ipc { -class Shmem; -} namespace layers { @@ -36,7 +48,6 @@ class ImageClient; class SharedPlanarYCbCrImage; class DeprecatedSharedPlanarYCbCrImage; class TextureClient; -class SurfaceDescriptor; struct ImageBackendData { diff --git a/gfx/layers/ImageDataSerializer.cpp b/gfx/layers/ImageDataSerializer.cpp index 43c834aa08ea..b4d9efc4d2ab 100644 --- a/gfx/layers/ImageDataSerializer.cpp +++ b/gfx/layers/ImageDataSerializer.cpp @@ -3,11 +3,15 @@ * 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/ImageDataSerializer.h" -#include "gfxImageSurface.h" -#include "mozilla/gfx/2D.h" -#include "gfx2DGlue.h" -#include "mozilla/gfx/Tools.h" +#include "ImageDataSerializer.h" +#include "gfx2DGlue.h" // for SurfaceFormatToImageFormat +#include "gfxASurface.h" // for gfxASurface +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/2D.h" // for DataSourceSurface, Factory +#include "mozilla/gfx/Tools.h" // for GetAlignedStride, etc +#include "mozilla/mozalloc.h" // for operator delete, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/ImageDataSerializer.h b/gfx/layers/ImageDataSerializer.h index a5c639fad446..629967240f69 100644 --- a/gfx/layers/ImageDataSerializer.h +++ b/gfx/layers/ImageDataSerializer.h @@ -8,10 +8,11 @@ #ifndef GFX_LAYERS_BLOBSURFACE_H #define GFX_LAYERS_BLOBSURFACE_H -#include "mozilla/gfx/Point.h" -#include "mozilla/RefPtr.h" - -#include +#include // for uint8_t, uint32_t +#include "mozilla/Attributes.h" // for MOZ_STACK_CLASS +#include "mozilla/RefPtr.h" // for TemporaryRef +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat class gfxImageSurface; diff --git a/gfx/layers/ImageLayers.cpp b/gfx/layers/ImageLayers.cpp index a195f1d07bbb..5ac726a4f58e 100644 --- a/gfx/layers/ImageLayers.cpp +++ b/gfx/layers/ImageLayers.cpp @@ -4,7 +4,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ImageLayers.h" -#include "ImageContainer.h" +#include "ImageContainer.h" // for ImageContainer +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxRect.h" // for gfxRect +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for ImageContainer::Release, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/ImageLayers.h b/gfx/layers/ImageLayers.h index 5433336d3b69..e8fa6ccbf927 100644 --- a/gfx/layers/ImageLayers.h +++ b/gfx/layers/ImageLayers.h @@ -6,11 +6,15 @@ #ifndef GFX_IMAGELAYER_H #define GFX_IMAGELAYER_H -#include "Layers.h" +#include "Layers.h" // for Layer, etc +#include "gfxPattern.h" // for gfxPattern, etc +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/layers/LayersTypes.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nscore.h" // for nsACString -#include "ImageTypes.h" -#include "nsISupportsImpl.h" -#include "gfxPattern.h" +class gfx3DMatrix; namespace mozilla { namespace layers { diff --git a/gfx/layers/LayerSorter.cpp b/gfx/layers/LayerSorter.cpp index 75f39852d3d8..8d242d64e89f 100644 --- a/gfx/layers/LayerSorter.cpp +++ b/gfx/layers/LayerSorter.cpp @@ -4,10 +4,23 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "LayerSorter.h" -#include "DirectedGraph.h" +#include // for fabs +#include // for uint32_t +#include // for fprintf, stderr, FILE +#include // for getenv +#include "DirectedGraph.h" // for DirectedGraph +#include "Layers.h" // for Layer +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxLineSegment.h" // for gfxLineSegment +#include "gfxPoint.h" // for gfxPoint +#include "gfxPoint3D.h" // for gfxPoint3D +#include "gfxQuad.h" // for gfxQuad +#include "gfxRect.h" // for gfxRect +#include "gfxTypes.h" // for gfxFloat +#include "mozilla/gfx/BasePoint3D.h" // for BasePoint3D +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsTArray, etc #include "limits.h" -#include "gfxLineSegment.h" -#include "Layers.h" #include "mozilla/Assertions.h" namespace mozilla { diff --git a/gfx/layers/LayerTreeInvalidation.cpp b/gfx/layers/LayerTreeInvalidation.cpp index b5d46903f577..57b4d6950673 100644 --- a/gfx/layers/LayerTreeInvalidation.cpp +++ b/gfx/layers/LayerTreeInvalidation.cpp @@ -4,10 +4,28 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "LayerTreeInvalidation.h" -#include "Layers.h" -#include "ImageLayers.h" -#include "gfxUtils.h" -#include "nsDataHashtable.h" +#include // for uint32_t +#include "ImageContainer.h" // for ImageContainer +#include "ImageLayers.h" // for ImageLayer, etc +#include "Layers.h" // for Layer, ContainerLayer, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxColor.h" // for gfxRGBA +#include "gfxPattern.h" // for gfxPattern, etc +#include "gfxPoint.h" // for gfxIntSize +#include "gfxPoint3D.h" // for gfxPoint3D +#include "gfxRect.h" // for gfxRect +#include "gfxUtils.h" // for gfxUtils +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsAutoPtr.h" // for nsRefPtr, nsAutoPtr, etc +#include "nsDataHashtable.h" // for nsDataHashtable +#include "nsDebug.h" // for NS_ASSERTION +#include "nsHashKeys.h" // for nsPtrHashKey +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsTArray.h" // for nsAutoTArray, nsTArray_Impl +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/LayerTreeInvalidation.h b/gfx/layers/LayerTreeInvalidation.h index 6a309d49499a..c2b8e679a58d 100644 --- a/gfx/layers/LayerTreeInvalidation.h +++ b/gfx/layers/LayerTreeInvalidation.h @@ -6,9 +6,10 @@ #ifndef GFX_LAYER_TREE_INVALIDATION_H #define GFX_LAYER_TREE_INVALIDATION_H -#include "nsRegion.h" +#include "nsRegion.h" // for nsIntRegion class nsPresContext; +struct nsIntPoint; namespace mozilla { namespace layers { diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index e1dfe6d0e683..f31e37df5ef9 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -5,25 +5,33 @@ * 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/DebugOnly.h" - -#include "mozilla/layers/AsyncPanZoomController.h" -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/LayerManagerComposite.h" -#include "mozilla/Telemetry.h" -#include "CompositableHost.h" - -#include "ImageLayers.h" -#include "ImageContainer.h" #include "Layers.h" -#include "gfxPlatform.h" -#include "ReadbackLayer.h" -#include "gfxUtils.h" -#include "nsPrintfCString.h" -#include "LayerSorter.h" -#include "AnimationCommon.h" -#include "mozilla/layers/Compositor.h" -#include "LayersLogging.h" +#include // for max, min +#include "AnimationCommon.h" // for ComputedTimingFunction +#include "CompositableHost.h" // for CompositableHost +#include "GeckoProfilerFunc.h" // for TimeStamp, TimeDuration +#include "ImageContainer.h" // for ImageContainer, etc +#include "ImageLayers.h" // for ImageLayer +#include "LayerSorter.h" // for SortLayersBy3DZOrder +#include "LayersLogging.h" // for AppendToString +#include "ReadbackLayer.h" // for ReadbackLayer +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxUtils.h" // for gfxUtils, etc +#include "mozilla/DebugOnly.h" // for DebugOnly +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/Telemetry.h" // for Accumulate +#include "mozilla/TelemetryHistogramEnums.h" +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/layers/AsyncPanZoomController.h" +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/LayerManagerComposite.h" // for LayerComposite +#include "mozilla/layers/LayerTransaction.h" // for TransformFunction, etc +#include "nsAString.h" +#include "nsCSSValue.h" // for nsCSSValue::Array, etc +#include "nsPrintfCString.h" // for nsPrintfCString +#include "nsStyleStruct.h" // for nsTimingFunction, etc using namespace mozilla::layers; using namespace mozilla::gfx; diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index 58f9d9266b82..021db5769cb6 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -6,25 +6,44 @@ #ifndef GFX_LAYERS_H #define GFX_LAYERS_H -#include "mozilla/DebugOnly.h" - +#include // for uint32_t, uint64_t, uint8_t +#include // for FILE +#include // for int32_t, int64_t +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "FrameMetrics.h" // for FrameMetrics +#include "Units.h" // for LayerMargin, LayerPoint +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxColor.h" // for gfxRGBA +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPattern.h" // for gfxPattern, etc +#include "gfxPoint.h" // for gfxPoint, gfxIntSize +#include "gfxRect.h" // for gfxRect +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2, etc +#include "mozilla/DebugOnly.h" // for DebugOnly +#include "mozilla/RefPtr.h" // for TemporaryRef +#include "mozilla/TimeStamp.h" // for TimeStamp, TimeDuration +#include "mozilla/gfx/BaseMargin.h" // for BaseMargin +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "mozilla/gfx/UserData.h" // for UserData, etc #include "mozilla/layers/LayersTypes.h" -#include "gfxTypes.h" -#include "gfxASurface.h" -#include "nsRegion.h" -#include "nsPoint.h" -#include "nsRect.h" -#include "nsISupportsImpl.h" -#include "nsAutoPtr.h" -#include "gfx3DMatrix.h" -#include "gfxColor.h" -#include "gfxPattern.h" -#include "nsTArray.h" -#include "nsThreadUtils.h" -#include "nsStyleAnimation.h" -#include "FrameMetrics.h" -#include "mozilla/gfx/2D.h" -#include "mozilla/TimeStamp.h" +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsAutoPtr, nsRefPtr, etc +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsCSSProperty.h" // for nsCSSProperty +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for Layer::Release, etc +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsSize.h" // for nsIntSize +#include "nsString.h" // for nsCString +#include "nsStyleAnimation.h" // for nsStyleAnimation::Value, etc +#include "nsTArray.h" // for nsTArray +#include "nsTArrayForwardDeclare.h" // for InfallibleTArray +#include "nscore.h" // for nsACString, nsAString +#include "prlog.h" // for PRLogModuleInfo class gfxContext; class nsPaintEvent; @@ -36,6 +55,10 @@ namespace mozilla { class FrameLayerBuilder; class WebGLContext; +namespace gfx { +class DrawTarget; +} + namespace gl { class GLContext; } @@ -67,7 +90,6 @@ class LayerManagerComposite; class SpecificLayerAttributes; class SurfaceDescriptor; class Compositor; -class LayerComposite; struct TextureFactoryIdentifier; struct EffectMask; @@ -591,7 +613,6 @@ private: TimeStamp mTabSwitchStart; }; -class ThebesLayer; typedef InfallibleTArray AnimationArray; struct AnimData { diff --git a/gfx/layers/LayersLogging.cpp b/gfx/layers/LayersLogging.cpp index 90e9bc84d093..b1c3080e1924 100644 --- a/gfx/layers/LayersLogging.cpp +++ b/gfx/layers/LayersLogging.cpp @@ -6,6 +6,15 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "LayersLogging.h" +#include // for uint8_t +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxColor.h" // for gfxRGBA +#include "gfxMatrix.h" // for gfxMatrix +#include "mozilla/gfx/Matrix.h" // for Matrix4x4, Matrix +#include "nsDebug.h" // for NS_ERROR +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize using namespace mozilla::gfx; diff --git a/gfx/layers/LayersLogging.h b/gfx/layers/LayersLogging.h index eaaf46c246d3..2b5a1a8d8489 100644 --- a/gfx/layers/LayersLogging.h +++ b/gfx/layers/LayersLogging.h @@ -6,19 +6,28 @@ #ifndef GFX_LAYERSLOGGING_H #define GFX_LAYERSLOGGING_H -#include "Layers.h" -#include "nsPoint.h" -#include "mozilla/gfx/Point.h" -#include "mozilla/gfx/Rect.h" -#include "mozilla/layers/Compositor.h" -#include "FrameMetrics.h" -#include "gfxPattern.h" -#include "gfxColor.h" -#include "gfx3DMatrix.h" -#include "nsRegion.h" -#include "nsPrintfCString.h" +#include "FrameMetrics.h" // for FrameMetrics, etc +#include "gfxPattern.h" // for gfxPattern, etc +#include "mozilla/gfx/Point.h" // for IntSize, etc +#include "mozilla/gfx/Types.h" // for Filter, SurfaceFormat +#include "mozilla/layers/CompositorTypes.h" // for TextureFlags +#include "nsAString.h" +#include "nsPrintfCString.h" // for nsPrintfCString +#include "nsRegion.h" // for nsIntRegion +#include "nscore.h" // for nsACString, etc + +class gfx3DMatrix; +struct gfxRGBA; +struct nsIntPoint; +struct nsIntRect; +struct nsIntSize; namespace mozilla { +namespace gfx { +class Matrix4x4; +template struct RectTyped; +} + namespace layers { nsACString& diff --git a/gfx/layers/LayersTypes.h b/gfx/layers/LayersTypes.h index 3bb376ed1fef..72b7421accc5 100644 --- a/gfx/layers/LayersTypes.h +++ b/gfx/layers/LayersTypes.h @@ -6,13 +6,15 @@ #ifndef GFX_LAYERSTYPES_H #define GFX_LAYERSTYPES_H -#include "nsPoint.h" +#include // for uint32_t +#include "nsPoint.h" // for nsIntPoint + #ifdef MOZ_WIDGET_GONK #include #endif #if defined(DEBUG) || defined(PR_LOGGING) # include // FILE -# include "prlog.h" +# include "prlog.h" // for PR_LOG # ifndef MOZ_LAYERS_HAVE_LOG # define MOZ_LAYERS_HAVE_LOG # endif diff --git a/gfx/layers/ReadbackLayer.h b/gfx/layers/ReadbackLayer.h index a94852c1218a..558eaaf4b585 100644 --- a/gfx/layers/ReadbackLayer.h +++ b/gfx/layers/ReadbackLayer.h @@ -6,7 +6,21 @@ #ifndef GFX_READBACKLAYER_H #define GFX_READBACKLAYER_H -#include "Layers.h" +#include // for uint64_t +#include "Layers.h" // for Layer, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxColor.h" // for gfxRGBA +#include "gfxRect.h" // for gfxRect +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsAutoPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "nscore.h" // for nsACString + +class gfxContext; namespace mozilla { namespace layers { diff --git a/gfx/layers/ReadbackProcessor.cpp b/gfx/layers/ReadbackProcessor.cpp index 0e6d92b60781..e0a3b5e5bbdd 100644 --- a/gfx/layers/ReadbackProcessor.cpp +++ b/gfx/layers/ReadbackProcessor.cpp @@ -4,7 +4,22 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ReadbackProcessor.h" -#include "ReadbackLayer.h" +#include // for int32_t +#include "Layers.h" // for Layer, ThebesLayer, etc +#include "ReadbackLayer.h" // for ReadbackLayer, ReadbackSink +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxColor.h" // for gfxRGBA +#include "gfxContext.h" // for gfxContext +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxRect.h" // for gfxRect +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "nsAutoPtr.h" // for nsRefPtr, nsAutoPtr +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for gfxContext::Release, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRegion.h" // for nsIntRegion +#include "nsSize.h" // for nsIntSize namespace mozilla { namespace layers { diff --git a/gfx/layers/ReadbackProcessor.h b/gfx/layers/ReadbackProcessor.h index 8e17e7f973f6..96c365ee5c21 100644 --- a/gfx/layers/ReadbackProcessor.h +++ b/gfx/layers/ReadbackProcessor.h @@ -6,14 +6,18 @@ #ifndef GFX_READBACKPROCESSOR_H #define GFX_READBACKPROCESSOR_H -#include "ThebesLayerBuffer.h" -#include "nsTArray.h" +#include // for uint64_t +#include "nsRect.h" // for nsIntRect +#include "nsTArray.h" // for nsTArray + +class nsIntRegion; namespace mozilla { namespace layers { class ContainerLayer; class ReadbackLayer; +class ThebesLayer; class ReadbackProcessor { public: diff --git a/gfx/layers/RenderTrace.cpp b/gfx/layers/RenderTrace.cpp index a433c07e4c50..3cc6c71086df 100644 --- a/gfx/layers/RenderTrace.cpp +++ b/gfx/layers/RenderTrace.cpp @@ -3,11 +3,11 @@ * 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 "Layers.h" #include "RenderTrace.h" // If rendertrace is off let's no compile this code #ifdef MOZ_RENDERTRACE +#include "Layers.h" namespace mozilla { diff --git a/gfx/layers/SharedTextureImage.h b/gfx/layers/SharedTextureImage.h index 7f7ed65ba604..6fbd87634110 100644 --- a/gfx/layers/SharedTextureImage.h +++ b/gfx/layers/SharedTextureImage.h @@ -6,9 +6,15 @@ #ifndef GFX_SHAREDTEXTUREIMAGE_H #define GFX_SHAREDTEXTUREIMAGE_H -#include "ImageContainer.h" -#include "GLContext.h" -#include "GLContextProvider.h" +#include "GLContext.h" // for GLContext, etc +#include "GLContextProvider.h" // for GLContextProvider +#include "ImageContainer.h" // for Image +#include "ImageTypes.h" // for ImageFormat::SHARED_TEXTURE +#include "gfxPoint.h" // for gfxIntSize +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsSize.h" // for nsIntSize + +class gfxASurface; // Split into a separate header from ImageLayers.h due to GLContext.h dependence // Implementation remains in ImageLayers.cpp diff --git a/gfx/layers/ThebesLayerBuffer.cpp b/gfx/layers/ThebesLayerBuffer.cpp index 69b4096a1ca2..a32bd669060a 100644 --- a/gfx/layers/ThebesLayerBuffer.cpp +++ b/gfx/layers/ThebesLayerBuffer.cpp @@ -3,19 +3,33 @@ * 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 "base/basictypes.h" - -#include "BasicLayersImpl.h" #include "ThebesLayerBuffer.h" -#include "Layers.h" -#include "gfxContext.h" -#include "gfxPlatform.h" -#include "gfxTeeSurface.h" -#include "gfxUtils.h" -#include "ipc/AutoOpenSurface.h" -#include "nsDeviceContext.h" -#include "GeckoProfiler.h" -#include +#include // for int32_t +#include // for max +#include "BasicImplData.h" // for BasicImplData +#include "BasicLayersImpl.h" // for ToData +#include "GeckoProfilerImpl.h" // for PROFILER_LABEL +#include "Layers.h" // for ThebesLayer, Layer, etc +#include "gfxColor.h" // for gfxRGBA +#include "gfxContext.h" // for gfxContext, etc +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPattern.h" // for gfxPattern +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxPoint.h" // for gfxPoint +#include "gfxRect.h" // for gfxRect +#include "gfxTeeSurface.h" // for gfxTeeSurface +#include "gfxUtils.h" // for gfxUtils +#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Matrix.h" // for Matrix +#include "mozilla/gfx/Point.h" // for Point, IntPoint +#include "mozilla/gfx/Rect.h" // for Rect, IntRect +#include "mozilla/gfx/Types.h" // for ExtendMode::EXTEND_CLAMP, etc +#include "mozilla/layers/ShadowLayers.h" // for ShadowableLayer +#include "mozilla/layers/TextureClient.h" // for DeprecatedTextureClient +#include "nsSize.h" // for nsIntSize namespace mozilla { diff --git a/gfx/layers/ThebesLayerBuffer.h b/gfx/layers/ThebesLayerBuffer.h index b235e080f091..5725e9bc2c14 100644 --- a/gfx/layers/ThebesLayerBuffer.h +++ b/gfx/layers/ThebesLayerBuffer.h @@ -6,17 +6,33 @@ #ifndef THEBESLAYERBUFFER_H_ #define THEBESLAYERBUFFER_H_ -#include "gfxContext.h" -#include "gfxASurface.h" -#include "nsRegion.h" -#include "mozilla/layers/TextureClient.h" -#include "mozilla/gfx/2D.h" -#include "Layers.h" +#include // for uint32_t +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxContext.h" // for gfxContext +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/gfx/2D.h" // for DrawTarget, etc +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsISupportsImpl.h" // for gfxContext::AddRef, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc + +struct gfxMatrix; +struct nsIntSize; namespace mozilla { +namespace gfx { +class Matrix; +} + namespace layers { -class AutoOpenSurface; +class DeprecatedTextureClient; class ThebesLayer; /** diff --git a/gfx/layers/TiledLayerBuffer.h b/gfx/layers/TiledLayerBuffer.h index fb9f2cd780b7..cce292ca9550 100644 --- a/gfx/layers/TiledLayerBuffer.h +++ b/gfx/layers/TiledLayerBuffer.h @@ -16,9 +16,13 @@ //#define GFX_TILEDLAYER_DEBUG_OVERLAY //#define GFX_TILEDLAYER_PREF_WARNINGS -#include "nsRect.h" -#include "nsRegion.h" -#include "nsTArray.h" +#include // for uint16_t, uint32_t +#include // for int32_t +#include "nsDebug.h" // for NS_ABORT_IF_FALSE +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsTArray namespace mozilla { namespace layers { diff --git a/gfx/layers/YCbCrImageDataSerializer.cpp b/gfx/layers/YCbCrImageDataSerializer.cpp index a97956da09e5..ed171224f016 100644 --- a/gfx/layers/YCbCrImageDataSerializer.cpp +++ b/gfx/layers/YCbCrImageDataSerializer.cpp @@ -4,12 +4,15 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/YCbCrImageDataSerializer.h" -#include "yuv_convert.h" -#include "mozilla/gfx/2D.h" -#include "gfx2DGlue.h" +#include // for memcpy +#include "gfx2DGlue.h" // for ToIntSize +#include "mozilla/gfx/2D.h" // for DataSourceSurface, Factory +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Types.h" +#include "mozilla/mozalloc.h" // for operator delete +#include "yuv_convert.h" // for ConvertYCbCrToRGB32, etc #define MOZ_ALIGN_WORD(x) (((x) + 3) & ~3) -using namespace mozilla::ipc; namespace mozilla { namespace layers { diff --git a/gfx/layers/YCbCrImageDataSerializer.h b/gfx/layers/YCbCrImageDataSerializer.h index cb48a9dda03e..1ec52ed00ee7 100644 --- a/gfx/layers/YCbCrImageDataSerializer.h +++ b/gfx/layers/YCbCrImageDataSerializer.h @@ -6,18 +6,17 @@ #ifndef MOZILLA_LAYERS_BLOBYCBCRSURFACE_H #define MOZILLA_LAYERS_BLOBYCBCRSURFACE_H -#include "mozilla/DebugOnly.h" - -#include "base/basictypes.h" -#include "Shmem.h" -#include "gfxPoint.h" +#include // for size_t +#include // for uint8_t, uint32_t +#include "ImageTypes.h" // for StereoMode +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Attributes.h" // for MOZ_STACK_CLASS +#include "mozilla/RefPtr.h" // for TemporaryRef +#include "mozilla/gfx/Point.h" // for IntSize namespace mozilla { -namespace ipc { - class Shmem; -} namespace gfx { - class DataSourceSurface; +class DataSourceSurface; } namespace layers { diff --git a/gfx/layers/basic/BasicCanvasLayer.cpp b/gfx/layers/basic/BasicCanvasLayer.cpp index 13e06d5dd909..50c1c2820188 100644 --- a/gfx/layers/basic/BasicCanvasLayer.cpp +++ b/gfx/layers/basic/BasicCanvasLayer.cpp @@ -3,20 +3,13 @@ * 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/PLayerTransactionParent.h" #include "BasicCanvasLayer.h" -#include "gfxImageSurface.h" -#include "GLContext.h" -#include "gfxUtils.h" -#include "gfxPlatform.h" -#include "mozilla/Preferences.h" -#include "BasicLayersImpl.h" -#include "SurfaceStream.h" -#include "SharedSurfaceGL.h" -#include "SharedSurfaceEGL.h" -#include "GeckoProfiler.h" - -#include "nsXULAppAPI.h" +#include "basic/BasicLayers.h" // for BasicLayerManager +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +class gfxContext; using namespace mozilla::gfx; using namespace mozilla::gl; diff --git a/gfx/layers/basic/BasicCanvasLayer.h b/gfx/layers/basic/BasicCanvasLayer.h index 808b29b0b08e..c28ddf1383f6 100644 --- a/gfx/layers/basic/BasicCanvasLayer.h +++ b/gfx/layers/basic/BasicCanvasLayer.h @@ -6,24 +6,19 @@ #ifndef GFX_BASICCANVASLAYER_H #define GFX_BASICCANVASLAYER_H -#include "BasicLayersImpl.h" -#include "nsXULAppAPI.h" -#include "BasicLayers.h" -#include "BasicImplData.h" -#include "mozilla/layers/CanvasClient.h" -#include "mozilla/Preferences.h" -#include "CopyableCanvasLayer.h" - -#include "gfxPlatform.h" +#include "BasicImplData.h" // for BasicImplData +#include "BasicLayers.h" // for BasicLayerManager +#include "CopyableCanvasLayer.h" // for CopyableCanvasLayer +#include "Layers.h" // for CanvasLayer, etc +#include "nsDebug.h" // for NS_ASSERTION +#include "nsRegion.h" // for nsIntRegion +class gfxContext; using namespace mozilla::gfx; namespace mozilla { namespace layers { -class CanvasClient2D; -class CanvasClientWebGL; - class BasicCanvasLayer : public CopyableCanvasLayer, public BasicImplData { diff --git a/gfx/layers/basic/BasicColorLayer.cpp b/gfx/layers/basic/BasicColorLayer.cpp index 1727116f58c2..2d93c228378c 100644 --- a/gfx/layers/basic/BasicColorLayer.cpp +++ b/gfx/layers/basic/BasicColorLayer.cpp @@ -3,8 +3,20 @@ * 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/PLayerTransactionParent.h" -#include "BasicLayersImpl.h" +#include "BasicLayersImpl.h" // for FillWithMask, etc +#include "Layers.h" // for ColorLayer, etc +#include "BasicImplData.h" // for BasicImplData +#include "BasicLayers.h" // for BasicLayerManager +#include "gfxContext.h" // for gfxContext, etc +#include "gfxRect.h" // for gfxRect +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gfx; diff --git a/gfx/layers/basic/BasicCompositor.h b/gfx/layers/basic/BasicCompositor.h index 999aa35a4890..70a30e5c3580 100644 --- a/gfx/layers/basic/BasicCompositor.h +++ b/gfx/layers/basic/BasicCompositor.h @@ -8,6 +8,7 @@ #include "mozilla/layers/Compositor.h" #include "mozilla/layers/TextureHost.h" +#include "mozilla/gfx/2D.h" namespace mozilla { namespace layers { diff --git a/gfx/layers/basic/BasicContainerLayer.cpp b/gfx/layers/basic/BasicContainerLayer.cpp index c65cc873c3b8..9b9fbd9af083 100644 --- a/gfx/layers/basic/BasicContainerLayer.cpp +++ b/gfx/layers/basic/BasicContainerLayer.cpp @@ -3,16 +3,24 @@ * 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 "BasicLayersImpl.h" #include "BasicContainerLayer.h" +#include // for int32_t +#include "BasicLayersImpl.h" // for ToData +#include "basic/BasicImplData.h" // for BasicImplData +#include "basic/BasicLayers.h" // for BasicLayerManager +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect using namespace mozilla::gfx; namespace mozilla { namespace layers { - - BasicContainerLayer::~BasicContainerLayer() { while (mFirstChild) { diff --git a/gfx/layers/basic/BasicContainerLayer.h b/gfx/layers/basic/BasicContainerLayer.h index de52a5846abe..ac9797776cad 100644 --- a/gfx/layers/basic/BasicContainerLayer.h +++ b/gfx/layers/basic/BasicContainerLayer.h @@ -6,8 +6,16 @@ #ifndef GFX_BASICCONTAINERLAYER_H #define GFX_BASICCONTAINERLAYER_H -#include "BasicLayers.h" -#include "BasicImplData.h" +#include "BasicImplData.h" // for BasicImplData +#include "BasicLayers.h" // for BasicLayerManager +#include "Layers.h" // for Layer, ContainerLayer +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxMatrix.h" // for gfxMatrix +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsUtils.h" // for NS_ADDREF, NS_RELEASE +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR +struct nsIntRect; namespace mozilla { namespace layers { diff --git a/gfx/layers/basic/BasicImageLayer.cpp b/gfx/layers/basic/BasicImageLayer.cpp index 607a29d3e630..f73e07f8fa77 100644 --- a/gfx/layers/basic/BasicImageLayer.cpp +++ b/gfx/layers/basic/BasicImageLayer.cpp @@ -3,22 +3,37 @@ * 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/PLayerTransactionParent.h" -#include "BasicLayersImpl.h" -#include "SharedTextureImage.h" -#include "gfxUtils.h" -#include "gfxSharedImageSurface.h" -#include "mozilla/layers/ImageClient.h" -#include "mozilla/layers/TextureClient.h" +#include "./../mozilla-config.h" // for MOZ_X11 +#include "BasicLayersImpl.h" // for FillWithMask, etc +#include "ImageContainer.h" // for AutoLockImage, etc +#include "ImageLayers.h" // for ImageLayer +#include "Layers.h" // for Layer (ptr only), etc +#include "basic/BasicImplData.h" // for BasicImplData +#include "basic/BasicLayers.h" // for BasicLayerManager +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxContext.h" // for gfxContext +#include "gfxPattern.h" // for gfxPattern, etc +#include "gfxPoint.h" // for gfxIntSize +#include "gfxUtils.h" // for gfxUtils #ifdef MOZ_X11 -#include "gfxXlibSurface.h" +#include "gfxXlibSurface.h" // for gfxXlibSurface #endif +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr, getter_AddRefs, etc +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for gfxPattern::Release, etc +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gfx; namespace mozilla { namespace layers { +class SurfaceDescriptor; + class BasicImageLayer : public ImageLayer, public BasicImplData { public: BasicImageLayer(BasicLayerManager* aLayerManager) : diff --git a/gfx/layers/basic/BasicImages.cpp b/gfx/layers/basic/BasicImages.cpp index c3c234ef4e64..8814d7f1d391 100644 --- a/gfx/layers/basic/BasicImages.cpp +++ b/gfx/layers/basic/BasicImages.cpp @@ -3,24 +3,27 @@ * 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/ReentrantMonitor.h" - -#include "ImageLayers.h" -#include "BasicLayers.h" -#include "gfxImageSurface.h" - +#include // for uint8_t, uint32_t +#include "BasicLayers.h" // for BasicLayerManager +#include "ImageContainer.h" // for PlanarYCbCrImage, etc +#include "ImageTypes.h" // for ImageFormat, etc +#include "cairo.h" // for cairo_user_data_key_t +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPlatform.h" // for gfxPlatform, gfxImageFormat +#include "gfxPoint.h" // for gfxIntSize +#include "gfxUtils.h" // for gfxUtils +#include "mozilla/mozalloc.h" // for operator delete[], etc +#include "nsAutoPtr.h" // for nsRefPtr, nsAutoArrayPtr +#include "nsAutoRef.h" // for nsCountedRef +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ERROR, NS_ASSERTION +#include "nsISupportsImpl.h" // for Image::Release, etc +#include "nsThreadUtils.h" // for NS_IsMainThread #ifdef XP_MACOSX #include "gfxQuartzImageSurface.h" #endif -#include "cairo.h" - -#include "gfxUtils.h" - -#include "gfxPlatform.h" - -using mozilla::ReentrantMonitor; - namespace mozilla { namespace layers { diff --git a/gfx/layers/basic/BasicImplData.h b/gfx/layers/basic/BasicImplData.h index 63e6a71fc9a2..33e278b586c5 100644 --- a/gfx/layers/basic/BasicImplData.h +++ b/gfx/layers/basic/BasicImplData.h @@ -5,9 +5,18 @@ #ifndef GFX_BASICIMPLDATA_H #define GFX_BASICIMPLDATA_H +#include "Layers.h" // for Layer (ptr only), etc +#include "gfxContext.h" // for gfxContext, etc +#include "nsDebug.h" // for NS_ASSERTION +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +class gfxASurface; + namespace mozilla { namespace layers { +class ReadbackProcessor; +class SurfaceDescriptor; + /** * This is the ImplData for all Basic layers. It also exposes methods * private to the Basic implementation that are common to all Basic layer types. diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp index 62f2ba8a66b6..8902291bfd04 100644 --- a/gfx/layers/basic/BasicLayerManager.cpp +++ b/gfx/layers/basic/BasicLayerManager.cpp @@ -3,33 +3,53 @@ * 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/dom/TabChild.h" -#include "mozilla/Hal.h" -#include "mozilla/layers/PLayerChild.h" -#include "mozilla/layers/PLayerTransactionChild.h" -#include "mozilla/layers/PLayerTransactionParent.h" - -#include "gfxSharedImageSurface.h" -#include "gfxImageSurface.h" -#include "gfxUtils.h" -#include "gfxPlatform.h" -#include "nsXULAppAPI.h" -#include "RenderTrace.h" -#include "GeckoProfiler.h" - +#include // for uint32_t +#include // for rand, RAND_MAX +#include // for int32_t +#include "BasicContainerLayer.h" // for BasicContainerLayer +#include "BasicLayersImpl.h" // for ToData, BasicReadbackLayer, etc +#include "GeckoProfilerImpl.h" // for PROFILER_LABEL +#include "ImageContainer.h" // for ImageFactory +#include "Layers.h" // for Layer, ContainerLayer, etc +#include "ReadbackLayer.h" // for ReadbackLayer +#include "ReadbackProcessor.h" // for ReadbackProcessor +#include "RenderTrace.h" // for RenderTraceLayers, etc +#include "basic/BasicImplData.h" // for BasicImplData +#include "basic/BasicLayers.h" // for BasicLayerManager, etc +#include "cairo-rename.h" // for pixman_image_create_bits, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxCachedTempSurface.h" // for gfxCachedTempSurface +#include "gfxColor.h" // for gfxRGBA +#include "gfxContext.h" // for gfxContext, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxPoint.h" // for gfxIntSize, gfxPoint +#include "gfxRect.h" // for gfxRect +#include "gfxUtils.h" // for gfxUtils +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/WidgetUtils.h" // for ScreenRotation +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/Matrix.h" // for Matrix +#include "mozilla/gfx/Rect.h" // for IntRect, Rect +#include "mozilla/layers/LayersTypes.h" // for BufferMode::BUFFER_NONE, etc +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION, etc +#include "nsISupportsImpl.h" // for gfxContext::Release, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion, etc +#include "nsTArray.h" // for nsAutoTArray +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc #define PIXMAN_DONT_DEFINE_STDINT -#include "pixman.h" +#include "pixman.h" // for pixman_f_transform, etc -#include "BasicLayersImpl.h" -#include "BasicThebesLayer.h" -#include "BasicContainerLayer.h" -#include "CompositorChild.h" -#include "mozilla/Preferences.h" -#include "nsIWidget.h" - -#ifdef MOZ_WIDGET_ANDROID -#include "AndroidBridge.h" -#endif +class nsIWidget; using namespace mozilla::dom; using namespace mozilla::gfx; diff --git a/gfx/layers/basic/BasicLayers.h b/gfx/layers/basic/BasicLayers.h index ecf0c9aa2d3b..e325e98d6ea4 100644 --- a/gfx/layers/basic/BasicLayers.h +++ b/gfx/layers/basic/BasicLayers.h @@ -6,29 +6,33 @@ #ifndef GFX_BASICLAYERS_H #define GFX_BASICLAYERS_H -#include "Layers.h" - -#include "gfxContext.h" -#include "gfxCachedTempSurface.h" -#include "mozilla/layers/ShadowLayers.h" -#include "mozilla/WidgetUtils.h" -#include "nsAutoRef.h" -#include "nsThreadUtils.h" +#include // for INT32_MAX, int32_t +#include "Layers.h" // for Layer (ptr only), etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxCachedTempSurface.h" // for gfxCachedTempSurface +#include "gfxContext.h" // for gfxContext +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/WidgetUtils.h" // for ScreenRotation +#include "mozilla/layers/LayersTypes.h" // for BufferMode, LayersBackend, etc +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for gfxContext::AddRef, etc +#include "nsRegion.h" // for nsIntRegion +#include "nscore.h" // for nsAString, etc +class gfxPattern; class nsIWidget; namespace mozilla { namespace layers { class BasicShadowableLayer; -class ThebesLayerComposite; -class ContainerLayerComposite; -class ImageLayerComposite; -class CanvasLayerComposite; -class ColorLayerComposite; -class ReadbackProcessor; class ImageFactory; +class ImageLayer; class PaintLayerContext; +class ReadbackLayer; +class ReadbackProcessor; /** * This is a cairo/Thebes-only, main-thread-only implementation of layers. diff --git a/gfx/layers/basic/BasicLayersImpl.cpp b/gfx/layers/basic/BasicLayersImpl.cpp index 58d565beaa40..56f6a11648c0 100644 --- a/gfx/layers/basic/BasicLayersImpl.cpp +++ b/gfx/layers/basic/BasicLayersImpl.cpp @@ -3,10 +3,15 @@ * 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/DebugOnly.h" - #include "BasicLayersImpl.h" -#include "mozilla/layers/PLayerTransaction.h" +#include // for operator new +#include "Layers.h" // for Layer, etc +#include "basic/BasicImplData.h" // for BasicImplData +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/DebugOnly.h" // for DebugOnly +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/ISurfaceAllocator.h" using namespace mozilla::gfx; diff --git a/gfx/layers/basic/BasicLayersImpl.h b/gfx/layers/basic/BasicLayersImpl.h index 13bd4a73d754..4f60cb5b9433 100644 --- a/gfx/layers/basic/BasicLayersImpl.h +++ b/gfx/layers/basic/BasicLayersImpl.h @@ -6,18 +6,27 @@ #ifndef GFX_BASICLAYERSIMPL_H #define GFX_BASICLAYERSIMPL_H -#include "ipc/AutoOpenSurface.h" -#include "ipc/ShadowLayerChild.h" -#include "BasicLayers.h" -#include "BasicImplData.h" -#include "ReadbackLayer.h" -#include "ReadbackProcessor.h" +#include "BasicImplData.h" // for BasicImplData +#include "BasicLayers.h" // for BasicLayerManager +#include "ReadbackLayer.h" // for ReadbackLayer +#include "gfxASurface.h" // for gfxASurface +#include "gfxContext.h" // for gfxContext, etc +#include "gfxMatrix.h" // for gfxMatrix +#include "ipc/AutoOpenSurface.h" // for AutoOpenSurface +#include "mozilla/Attributes.h" // for MOZ_DELETE, MOZ_STACK_CLASS +#include "mozilla/Util.h" // for Maybe +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for gfxContext::Release, etc +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { class BasicContainerLayer; -class ShadowableLayer; +class Layer; class AutoSetOperator { public: diff --git a/gfx/layers/basic/BasicThebesLayer.cpp b/gfx/layers/basic/BasicThebesLayer.cpp index 5ad051e10dab..7b0010e93051 100644 --- a/gfx/layers/basic/BasicThebesLayer.cpp +++ b/gfx/layers/basic/BasicThebesLayer.cpp @@ -4,12 +4,29 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "BasicThebesLayer.h" -#include "gfxUtils.h" -#include "nsIWidget.h" -#include "RenderTrace.h" -#include "GeckoProfiler.h" - -#include "prprf.h" +#include // for uint32_t +#include "GeckoProfiler.h" // for PROFILER_LABEL +#include "ReadbackLayer.h" // for ReadbackLayer, ReadbackSink +#include "ReadbackProcessor.h" // for ReadbackProcessor::Update, etc +#include "RenderTrace.h" // for RenderTraceInvalidateEnd, etc +#include "BasicLayersImpl.h" // for AutoMaskData, etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxContext.h" // for gfxContext, etc +#include "gfxRect.h" // for gfxRect +#include "gfxUtils.h" // for gfxUtils +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/Matrix.h" // for Matrix +#include "mozilla/gfx/Rect.h" // for Rect, IntRect +#include "mozilla/gfx/Types.h" // for Float, etc +#include "mozilla/layers/LayersTypes.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for gfxContext::Release, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsTArray.h" // for nsTArray, nsTArray_Impl +struct gfxMatrix; using namespace mozilla::gfx; diff --git a/gfx/layers/basic/BasicThebesLayer.h b/gfx/layers/basic/BasicThebesLayer.h index 4a79b1abd52c..98f6f3123f2a 100644 --- a/gfx/layers/basic/BasicThebesLayer.h +++ b/gfx/layers/basic/BasicThebesLayer.h @@ -6,13 +6,26 @@ #ifndef GFX_BASICTHEBESLAYER_H #define GFX_BASICTHEBESLAYER_H -#include "mozilla/layers/PLayerTransactionParent.h" -#include "BasicLayersImpl.h" -#include "mozilla/layers/ContentClient.h" +#include "Layers.h" // for ThebesLayer, LayerManager, etc +#include "ThebesLayerBuffer.h" // for ThebesLayerBuffer, etc +#include "BasicImplData.h" // for BasicImplData +#include "BasicLayers.h" // for BasicLayerManager +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxPoint.h" // for gfxPoint +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/layers/ContentClient.h" // for ContentClientBasic +#include "mozilla/mozalloc.h" // for operator delete +#include "nsDebug.h" // for NS_ASSERTION +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +class gfxContext; namespace mozilla { namespace layers { +class ReadbackProcessor; + class BasicThebesLayer : public ThebesLayer, public BasicImplData { public: typedef ThebesLayerBuffer::PaintState PaintState; diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index 259c14d6ebde..aa4a02434e9e 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -4,20 +4,34 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/CanvasClient.h" -#include "mozilla/layers/TextureClient.h" -#include "ClientCanvasLayer.h" -#include "mozilla/layers/ShadowLayers.h" -#include "SharedTextureImage.h" -#include "nsXULAppAPI.h" -#include "GLContext.h" -#include "SurfaceStream.h" -#include "SharedSurface.h" +#include "ClientCanvasLayer.h" // for ClientCanvasLayer +#include "GLContext.h" // for GLContext +#include "GLScreenBuffer.h" // for GLScreenBuffer +#include "Layers.h" // for Layer, etc +#include "SurfaceStream.h" // for SurfaceStream +#include "SurfaceTypes.h" // for SurfaceStreamHandle +#include "gfx2DGlue.h" // for ImageFormatToSurfaceFormat +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/layers/CompositableForwarder.h" +#include "mozilla/layers/LayersTypes.h" +#include "mozilla/layers/TextureClient.h" // for TextureClient, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for printf_stderr, NS_ASSERTION +#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #ifdef MOZ_WIDGET_GONK #include "SharedSurfaceGralloc.h" #endif using namespace mozilla::gl; +namespace mozilla { +namespace gfx { +class SharedSurface; +} +} + namespace mozilla { namespace layers { diff --git a/gfx/layers/client/CanvasClient.h b/gfx/layers/client/CanvasClient.h index 3f4a96c6e87c..bbc1849c5156 100644 --- a/gfx/layers/client/CanvasClient.h +++ b/gfx/layers/client/CanvasClient.h @@ -6,14 +6,23 @@ #ifndef MOZILLA_GFX_CANVASCLIENT_H #define MOZILLA_GFX_CANVASCLIENT_H -#include "mozilla/layers/TextureClient.h" -#include "mozilla/layers/CompositableClient.h" +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/layers/CompositableClient.h" // for CompositableClient +#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/TextureClient.h" // for TextureClient, etc +#include "mozilla/mozalloc.h" // for operator delete + +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat namespace mozilla { - namespace layers { class ClientCanvasLayer; +class CompositableForwarder; /** * Compositable client for 2d and webgl canvas. diff --git a/gfx/layers/client/ClientCanvasLayer.cpp b/gfx/layers/client/ClientCanvasLayer.cpp index 1d8ad3e4ceef..fe462f713372 100644 --- a/gfx/layers/client/ClientCanvasLayer.cpp +++ b/gfx/layers/client/ClientCanvasLayer.cpp @@ -4,10 +4,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ClientCanvasLayer.h" -#include "gfxPlatform.h" -#include "SurfaceStream.h" -#include "SharedSurfaceGL.h" -#include "SharedSurfaceEGL.h" +#include "GLContext.h" // for GLContext +#include "GLScreenBuffer.h" // for GLScreenBuffer +#include "GeckoProfilerImpl.h" // for PROFILER_LABEL +#include "SharedSurfaceEGL.h" // for SurfaceFactory_EGLImage +#include "SharedSurfaceGL.h" // for SurfaceFactory_GLTexture, etc +#include "SurfaceStream.h" // for SurfaceStream, etc +#include "SurfaceTypes.h" // for SurfaceStreamType +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/LayersTypes.h" +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsRect.h" // for nsIntRect +#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #ifdef MOZ_WIDGET_GONK #include "SharedSurfaceGralloc.h" #endif diff --git a/gfx/layers/client/ClientCanvasLayer.h b/gfx/layers/client/ClientCanvasLayer.h index 67bdaf64dfd1..f7f1ea9ff591 100644 --- a/gfx/layers/client/ClientCanvasLayer.h +++ b/gfx/layers/client/ClientCanvasLayer.h @@ -6,21 +6,26 @@ #ifndef GFX_CLIENTCANVASLAYER_H #define GFX_CLIENTCANVASLAYER_H -#include "ClientLayerManager.h" -#include "nsXULAppAPI.h" -#include "gfxASurface.h" -#include "mozilla/Preferences.h" -#include "mozilla/layers/LayerTransaction.h" -#include "mozilla/layers/CanvasClient.h" -#include "CopyableCanvasLayer.h" +#include "mozilla/layers/CanvasClient.h" // for CanvasClient, etc +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "CopyableCanvasLayer.h" // for CopyableCanvasLayer +#include "Layers.h" // for CanvasLayer, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/LayerTransaction.h" // for CanvasLayerAttributes, etc +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_ASSERTION +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gfx; namespace mozilla { namespace layers { -class CanvasClient2D; -class CanvasClientWebGL; +class CompositableClient; +class ShadowableLayer; class ClientCanvasLayer : public CopyableCanvasLayer, public ClientLayer diff --git a/gfx/layers/client/ClientColorLayer.cpp b/gfx/layers/client/ClientColorLayer.cpp index a7b84164ff10..730270e2b27a 100644 --- a/gfx/layers/client/ClientColorLayer.cpp +++ b/gfx/layers/client/ClientColorLayer.cpp @@ -3,14 +3,24 @@ * 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 "ClientLayerManager.h" -#include "mozilla/layers/LayerTransaction.h" +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "Layers.h" // for ColorLayer, etc +#include "mozilla/layers/LayerTransaction.h" // for ColorLayerAttributes, etc +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gfx; namespace mozilla { namespace layers { +class ShadowableLayer; + class ClientColorLayer : public ColorLayer, public ClientLayer { public: diff --git a/gfx/layers/client/ClientContainerLayer.cpp b/gfx/layers/client/ClientContainerLayer.cpp index 2c531fda7759..06bc0e31bc66 100644 --- a/gfx/layers/client/ClientContainerLayer.cpp +++ b/gfx/layers/client/ClientContainerLayer.cpp @@ -1,5 +1,17 @@ +/* -*- 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 "ClientContainerLayer.h" -#include "BasicLayersImpl.h" +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for Layer::AddRef, etc + +namespace mozilla { +namespace layers { already_AddRefed ClientLayerManager::CreateContainerLayer() @@ -20,3 +32,6 @@ ClientLayerManager::CreateRefLayer() CREATE_SHADOW(Ref); return layer.forget(); } + +} +} diff --git a/gfx/layers/client/ClientContainerLayer.h b/gfx/layers/client/ClientContainerLayer.h index 68d8ef0b6d28..5a1de728f42f 100644 --- a/gfx/layers/client/ClientContainerLayer.h +++ b/gfx/layers/client/ClientContainerLayer.h @@ -1,7 +1,27 @@ -#include "ClientLayerManager.h" -#include "gfxPlatform.h" +/* -*- 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/. */ -using namespace mozilla::layers; +#ifndef GFX_CLIENTCONTAINERLAYER_H +#define GFX_CLIENTCONTAINERLAYER_H + +#include // for uint32_t +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "Layers.h" // for Layer, ContainerLayer, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPlatform.h" // for gfxPlatform +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsUtils.h" // for NS_ADDREF, NS_RELEASE +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsAutoTArray +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc + +namespace mozilla { +namespace layers { + +class ShadowableLayer; template void ContainerInsertAfter(Layer* aChild, Layer* aAfter, Container* aContainer) @@ -280,3 +300,8 @@ private: return static_cast(mManager); } }; + +} +} + +#endif diff --git a/gfx/layers/client/ClientImageLayer.cpp b/gfx/layers/client/ClientImageLayer.cpp index ae1af7fe6aa2..453d0ce5ff91 100644 --- a/gfx/layers/client/ClientImageLayer.cpp +++ b/gfx/layers/client/ClientImageLayer.cpp @@ -3,16 +3,32 @@ * 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 "ClientLayerManager.h" -#include "mozilla/layers/LayerTransaction.h" -#include "mozilla/layers/ImageClient.h" -#include "ImageContainer.h" +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "ImageContainer.h" // for AutoLockImage, etc +#include "ImageLayers.h" // for ImageLayer +#include "gfxASurface.h" // for gfxASurface +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/ImageClient.h" // for ImageClient, etc +#include "mozilla/layers/LayerTransaction.h" // for ImageLayerAttributes, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr, getter_AddRefs, etc +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gfx; namespace mozilla { namespace layers { +class CompositableClient; +class Layer; +class ShadowableLayer; + class ClientImageLayer : public ImageLayer, public ClientLayer { public: diff --git a/gfx/layers/client/ClientLayerManager.cpp b/gfx/layers/client/ClientLayerManager.cpp index 77140baaa380..a8bb57c83168 100644 --- a/gfx/layers/client/ClientLayerManager.cpp +++ b/gfx/layers/client/ClientLayerManager.cpp @@ -4,18 +4,27 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ClientLayerManager.h" -#include "nsIWidget.h" -#include "mozilla/dom/TabChild.h" +#include "CompositorChild.h" // for CompositorChild +#include "GeckoProfilerImpl.h" // for PROFILER_LABEL +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "ipc/AutoOpenSurface.h" // for AutoOpenSurface +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc #include "mozilla/Hal.h" -#include "mozilla/layers/PLayerChild.h" +#include "mozilla/dom/ScreenOrientation.h" // for ScreenOrientation +#include "mozilla/dom/TabChild.h" // for TabChild +#include "mozilla/hal_sandbox/PHal.h" // for ScreenConfiguration +#include "mozilla/layers/CompositableClient.h" // for CompositableChild, etc +#include "mozilla/layers/ContentClient.h" // for ContentClientRemote +#include "mozilla/layers/ISurfaceAllocator.h" +#include "mozilla/layers/LayerTransaction.h" // for EditReply, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/PLayerChild.h" // for PLayerChild #include "mozilla/layers/PLayerTransactionChild.h" -#include "mozilla/layers/PLayerTransactionParent.h" -#include "CompositorChild.h" -#include "ipc/AutoOpenSurface.h" -#include "ipc/ShadowLayerChild.h" -#include "mozilla/layers/CompositableClient.h" -#include "mozilla/layers/ContentClient.h" - +#include "nsAString.h" +#include "nsIWidget.h" // for nsIWidget +#include "nsTArray.h" // for AutoInfallibleTArray +#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #ifdef MOZ_WIDGET_ANDROID #include "AndroidBridge.h" #endif diff --git a/gfx/layers/client/ClientLayerManager.h b/gfx/layers/client/ClientLayerManager.h index 78954338516d..1b3b61c8d2d0 100644 --- a/gfx/layers/client/ClientLayerManager.h +++ b/gfx/layers/client/ClientLayerManager.h @@ -6,13 +6,33 @@ #ifndef GFX_CLIENTLAYERMANAGER_H #define GFX_CLIENTLAYERMANAGER_H +#include // for int32_t #include "Layers.h" -#include "mozilla/layers/ShadowLayers.h" +#include "gfxContext.h" // for gfxContext +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/WidgetUtils.h" // for ScreenRotation +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/LayersTypes.h" // for BufferMode, LayersBackend, etc +#include "mozilla/layers/ShadowLayers.h" // for ShadowLayerForwarder, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ABORT_IF_FALSE +#include "nsISupportsImpl.h" // for Layer::Release, etc +#include "nsRect.h" // for nsIntRect +#include "nsTArray.h" // for nsTArray +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR +#include "nscore.h" // for nsAString + +class nsIWidget; namespace mozilla { namespace layers { +class ClientThebesLayer; class CompositorChild; +class ImageLayer; +class PLayerChild; class ClientLayerManager : public LayerManager, public ShadowLayerForwarder @@ -182,7 +202,6 @@ private: bool mCompositorMightResample; }; -class ClientThebesLayer; class ClientLayer : public ShadowableLayer { public: diff --git a/gfx/layers/client/ClientThebesLayer.cpp b/gfx/layers/client/ClientThebesLayer.cpp index 12a4c5e8a99f..f553cc4f3f4d 100644 --- a/gfx/layers/client/ClientThebesLayer.cpp +++ b/gfx/layers/client/ClientThebesLayer.cpp @@ -4,7 +4,22 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ClientThebesLayer.h" -#include "ClientTiledThebesLayer.h" +#include // for uint32_t +#include "GeckoProfilerImpl.h" // for PROFILER_LABEL +#include "client/ClientLayerManager.h" // for ClientLayerManager, etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxContext.h" // for gfxContext +#include "gfxRect.h" // for gfxRect +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/Matrix.h" // for Matrix +#include "mozilla/gfx/Rect.h" // for Rect, IntRect +#include "mozilla/gfx/Types.h" // for Float, etc +#include "mozilla/layers/LayersTypes.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsRect.h" // for nsIntRect using namespace mozilla::gfx; diff --git a/gfx/layers/client/ClientThebesLayer.h b/gfx/layers/client/ClientThebesLayer.h index 9a61167caa41..2c36624c99fa 100644 --- a/gfx/layers/client/ClientThebesLayer.h +++ b/gfx/layers/client/ClientThebesLayer.h @@ -6,13 +6,27 @@ #ifndef GFX_CLIENTTHEBESLAYER_H #define GFX_CLIENTTHEBESLAYER_H -#include "ClientLayerManager.h" -#include "ThebesLayerBuffer.h" -#include "mozilla/layers/ContentClient.h" +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "Layers.h" // for ThebesLayer, etc +#include "ThebesLayerBuffer.h" // for ThebesLayerBuffer, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/ContentClient.h" // for ContentClient +#include "mozilla/mozalloc.h" // for operator delete +#include "nsDebug.h" // for NS_ASSERTION +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +#include "mozilla/layers/PLayerTransaction.h" // for ThebesLayerAttributes + +class gfxContext; namespace mozilla { namespace layers { +class CompositableClient; +class ShadowableLayer; +class SpecificLayerAttributes; + class ClientThebesLayer : public ThebesLayer, public ClientLayer { public: diff --git a/gfx/layers/client/ClientTiledThebesLayer.cpp b/gfx/layers/client/ClientTiledThebesLayer.cpp index 9b211ea1adf4..2517704a35e9 100644 --- a/gfx/layers/client/ClientTiledThebesLayer.cpp +++ b/gfx/layers/client/ClientTiledThebesLayer.cpp @@ -2,12 +2,21 @@ * 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/PLayerTransactionChild.h" #include "ClientTiledThebesLayer.h" -#include "gfxImageSurface.h" -#include "GeckoProfiler.h" -#include "gfxPlatform.h" - +#include "FrameMetrics.h" // for FrameMetrics +#include "Units.h" // for ScreenIntRect, CSSPoint, etc +#include "ClientLayerManager.h" // for ClientLayerManager, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxPoint.h" // for gfxSize +#include "gfxRect.h" // for gfxRect +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Rect.h" // for Rect, RectTyped +#include "mozilla/layers/LayerTransaction.h" +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsRect.h" // for nsIntRect +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/client/ClientTiledThebesLayer.h b/gfx/layers/client/ClientTiledThebesLayer.h index bee877723bcd..c01967653492 100644 --- a/gfx/layers/client/ClientTiledThebesLayer.h +++ b/gfx/layers/client/ClientTiledThebesLayer.h @@ -5,14 +5,20 @@ #ifndef GFX_CLIENTTILEDTHEBESLAYER_H #define GFX_CLIENTTILEDTHEBESLAYER_H -#include "mozilla/layers/ShadowLayers.h" -#include "ClientLayerManager.h" -#include "mozilla/layers/TiledContentClient.h" // tiles and tile buffer +#include "ClientLayerManager.h" // for ClientLayer, etc +#include "Layers.h" // for ThebesLayer, etc +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/TiledContentClient.h" +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsRegion.h" // for nsIntRegion + +class gfxContext; namespace mozilla { namespace layers { -class BasicTiledLayerBuffer; +class ShadowableLayer; +class SpecificLayerAttributes; /** * An implementation of ThebesLayer that ONLY supports remote diff --git a/gfx/layers/client/CompositableClient.cpp b/gfx/layers/client/CompositableClient.cpp index 50a41f43e495..bda5af0134d1 100644 --- a/gfx/layers/client/CompositableClient.cpp +++ b/gfx/layers/client/CompositableClient.cpp @@ -4,11 +4,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/CompositableClient.h" -#include "mozilla/layers/TextureClient.h" -#include "mozilla/layers/TextureClientOGL.h" -#include "mozilla/layers/LayerTransactionChild.h" +#include // for uint64_t, uint32_t +#include "gfxPlatform.h" // for gfxPlatform #include "mozilla/layers/CompositableForwarder.h" -#include "gfxPlatform.h" +#include "mozilla/layers/TextureClient.h" // for DeprecatedTextureClient, etc +#include "mozilla/layers/TextureClientOGL.h" +#include "mozilla/mozalloc.h" // for operator delete, etc #ifdef XP_WIN #include "mozilla/layers/TextureD3D9.h" #include "mozilla/layers/TextureD3D11.h" diff --git a/gfx/layers/client/CompositableClient.h b/gfx/layers/client/CompositableClient.h index fbd33bff9916..1649d6c8d8ee 100644 --- a/gfx/layers/client/CompositableClient.h +++ b/gfx/layers/client/CompositableClient.h @@ -6,20 +6,24 @@ #ifndef MOZILLA_GFX_BUFFERCLIENT_H #define MOZILLA_GFX_BUFFERCLIENT_H -#include "mozilla/layers/PCompositableChild.h" -#include "mozilla/layers/LayersTypes.h" -#include "mozilla/RefPtr.h" +#include // for uint64_t +#include // for vector +#include "mozilla/Assertions.h" // for MOZ_CRASH +#include "mozilla/RefPtr.h" // for TemporaryRef, RefCounted +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/LayersTypes.h" // for LayersBackend +#include "mozilla/layers/PCompositableChild.h" // for PCompositableChild +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { -class CompositableChild; class CompositableClient; class DeprecatedTextureClient; class TextureClient; class BufferTextureClient; class ImageBridgeChild; -class ShadowableLayer; class CompositableForwarder; class CompositableChild; class SurfaceDescriptor; diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 9d623e594a9b..fcc7d138acf9 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -4,13 +4,29 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/ContentClient.h" -#include "mozilla/gfx/2D.h" -#include "BasicThebesLayer.h" -#include "nsIWidget.h" -#include "gfxUtils.h" -#include "gfxPlatform.h" +#include "BasicLayers.h" // for BasicLayerManager +#include "Layers.h" // for ThebesLayer, Layer, etc +#include "gfxColor.h" // for gfxRGBA +#include "gfxContext.h" // for gfxContext, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxPoint.h" // for gfxIntSize, gfxPoint +#include "gfxTeeSurface.h" // for gfxTeeSurface +#include "gfxUtils.h" // for gfxUtils +#include "ipc/ShadowLayers.h" // for ShadowLayerForwarder +#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/gfx/2D.h" // for DrawTarget, Factory +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" #include "mozilla/layers/LayerManagerComposite.h" -#include "gfxTeeSurface.h" +#include "mozilla/layers/LayerTransaction.h" // for ThebesBufferData +#include "mozilla/layers/LayersTypes.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING, etc +#include "nsISupportsImpl.h" // for gfxContext::Release, etc +#include "nsIWidget.h" // for nsIWidget +#include "prenv.h" // for PR_GetEnv #ifdef XP_WIN #include "gfxWindowsPlatform.h" #endif diff --git a/gfx/layers/client/ContentClient.h b/gfx/layers/client/ContentClient.h index 7478409d449d..900e738c9f8e 100644 --- a/gfx/layers/client/ContentClient.h +++ b/gfx/layers/client/ContentClient.h @@ -6,19 +6,39 @@ #ifndef MOZILLA_GFX_CONTENTCLIENT_H #define MOZILLA_GFX_CONTENTCLIENT_H -#include "mozilla/layers/LayersSurfaces.h" -#include "mozilla/layers/CompositableClient.h" -#include "gfxReusableSurfaceWrapper.h" -#include "mozilla/layers/TextureClient.h" -#include "ThebesLayerBuffer.h" -#include "ipc/AutoOpenSurface.h" -#include "ipc/ShadowLayerChild.h" -#include "gfxPlatform.h" +#include // for uint32_t +#include "ThebesLayerBuffer.h" // for ThebesLayerBuffer, etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "mozilla/Assertions.h" // for MOZ_CRASH +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/layers/CompositableClient.h" // for CompositableClient +#include "mozilla/layers/CompositableForwarder.h" +#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc +#include "mozilla/layers/ISurfaceAllocator.h" +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/TextureClient.h" // for DeprecatedTextureClient +#include "mozilla/mozalloc.h" // for operator delete +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsTArray + +class gfxContext; +struct gfxMatrix; namespace mozilla { +namespace gfx { +class DrawTarget; +} + namespace layers { class BasicLayerManager; +class ThebesLayer; /** * A compositable client for Thebes layers. These are different to Image/Canvas diff --git a/gfx/layers/client/ImageClient.cpp b/gfx/layers/client/ImageClient.cpp index bb3a1c2635dd..8c86bbac3d38 100644 --- a/gfx/layers/client/ImageClient.cpp +++ b/gfx/layers/client/ImageClient.cpp @@ -3,16 +3,35 @@ * 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/TextureClient.h" -#include "mozilla/layers/ImageClient.h" -#include "BasicLayers.h" -#include "mozilla/layers/ShadowLayers.h" -#include "SharedTextureImage.h" -#include "ImageContainer.h" // For PlanarYCbCrImage -#include "mozilla/layers/SharedRGBImage.h" +#include "ImageClient.h" +#include // for uint32_t +#include "ImageContainer.h" // for Image, PlanarYCbCrImage, etc +#include "ImageTypes.h" // for ImageFormat::PLANAR_YCBCR, etc +#include "SharedTextureImage.h" // for SharedTextureImage::Data, etc +#include "gfx2DGlue.h" // for ImageFormatToSurfaceFormat +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat, etc +#include "mozilla/layers/CompositableClient.h" // for CompositableClient +#include "mozilla/layers/CompositableForwarder.h" +#include "mozilla/layers/CompositorTypes.h" // for CompositableType, etc +#include "mozilla/layers/ISurfaceAllocator.h" +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc +#include "mozilla/layers/ShadowLayers.h" // for ShadowLayerForwarder #include "mozilla/layers/SharedPlanarYCbCrImage.h" -#include "gfxPlatform.h" - +#include "mozilla/layers/SharedRGBImage.h" +#include "mozilla/layers/TextureClient.h" // for TextureClient, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_WARNING, NS_ASSERTION +#include "nsISupportsImpl.h" // for Image::Release, etc +#include "nsRect.h" // for nsIntRect #ifdef MOZ_WIDGET_GONK #include "GrallocImages.h" #endif diff --git a/gfx/layers/client/ImageClient.h b/gfx/layers/client/ImageClient.h index b7d1b8cfd256..abea3e2959b1 100644 --- a/gfx/layers/client/ImageClient.h +++ b/gfx/layers/client/ImageClient.h @@ -6,17 +6,26 @@ #ifndef MOZILLA_GFX_IMAGECLIENT_H #define MOZILLA_GFX_IMAGECLIENT_H -#include "mozilla/layers/LayersSurfaces.h" -#include "mozilla/layers/CompositableClient.h" -#include "mozilla/layers/TextureClient.h" -#include "gfxPattern.h" +#include // for uint32_t, uint64_t +#include // for int32_t +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "mozilla/layers/CompositableClient.h" // for CompositableClient +#include "mozilla/layers/CompositorTypes.h" // for CompositableType, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/TextureClient.h" // for DeprecatedTextureClient, etc +#include "mozilla/mozalloc.h" // for operator delete +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsRect.h" // for nsIntRect namespace mozilla { namespace layers { +class CompositableForwarder; +class Image; class ImageContainer; -class ImageLayer; -class PlanarYCbCrImage; +class ShadowableLayer; /** * Image clients are used by basic image layers on the content thread, they diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index c52c0377ff75..0751815c5faa 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -4,32 +4,29 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/TextureClient.h" -#include "mozilla/layers/TextureClientOGL.h" - -#include "mozilla/layers/ImageClient.h" -#include "mozilla/layers/CanvasClient.h" -#include "mozilla/layers/ContentClient.h" -#include "mozilla/layers/ShadowLayers.h" -#include "mozilla/layers/SharedPlanarYCbCrImage.h" -#include "GLContext.h" -#include "BasicLayers.h" // for PaintContext -#include "mozilla/layers/YCbCrImageDataSerializer.h" -#include "gfxReusableSurfaceWrapper.h" -#include "gfxPlatform.h" +#include // for uint8_t, uint32_t, etc +#include "Layers.h" // for Layer, etc +#include "gfxContext.h" // for gfxContext, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxPoint.h" // for gfxIntSize, gfxSize +#include "gfxReusableSurfaceWrapper.h" // for gfxReusableSurfaceWrapper +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc +#include "mozilla/layers/CompositableClient.h" // for CompositableClient +#include "mozilla/layers/CompositableForwarder.h" +#include "mozilla/layers/ISurfaceAllocator.h" #include "mozilla/layers/ImageDataSerializer.h" -#include "gfx2DGlue.h" - -#include +#include "mozilla/layers/ShadowLayers.h" // for ShadowLayerForwarder +#include "mozilla/layers/SharedPlanarYCbCrImage.h" +#include "mozilla/layers/YCbCrImageDataSerializer.h" +#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING, etc +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gl; namespace mozilla { namespace layers { - - - - TextureClient::TextureClient(TextureFlags aFlags) : mID(0) , mFlags(aFlags) diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index b659363685b6..9d8705208ee4 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -6,25 +6,34 @@ #ifndef MOZILLA_GFX_TEXTURECLIENT_H #define MOZILLA_GFX_TEXTURECLIENT_H -#include "mozilla/layers/LayersSurfaces.h" -#include "gfxASurface.h" -#include "mozilla/layers/CompositorTypes.h" // for TextureInfo -#include "mozilla/RefPtr.h" -#include "ImageContainer.h" // for PlanarYCbCrImage::Data +#include // for size_t +#include // for uint32_t, uint8_t, uint64_t +#include "GLContext.h" // for GLContext (ptr only), etc +#include "GLTextureImage.h" // for TextureImage +#include "ImageContainer.h" // for PlanarYCbCrImage, etc +#include "ImageTypes.h" // for StereoMode +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, RefCounted +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "mozilla/ipc/Shmem.h" // for Shmem +#include "mozilla/layers/CompositorTypes.h" // for TextureFlags, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsISupportsImpl.h" // for TextureImage::AddRef, etc class gfxReusableSurfaceWrapper; namespace mozilla { - -namespace gl { -class GLContext; -} - namespace layers { class ContentClient; -class PlanarYCbCrImage; -class Image; class CompositableForwarder; class ISurfaceAllocator; class CompositableClient; diff --git a/gfx/layers/client/TiledContentClient.cpp b/gfx/layers/client/TiledContentClient.cpp index ef58d52beb1c..f8fdee360b70 100644 --- a/gfx/layers/client/TiledContentClient.cpp +++ b/gfx/layers/client/TiledContentClient.cpp @@ -4,9 +4,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/TiledContentClient.h" -#include "mozilla/gfx/2D.h" -#include "mozilla/MathAlgorithms.h" -#include "ClientTiledThebesLayer.h" +#include // for ceil, ceilf, floor +#include "ClientTiledThebesLayer.h" // for ClientTiledThebesLayer +#include "GeckoProfilerImpl.h" // for PROFILER_LABEL +#include "ClientLayerManager.h" // for ClientLayerManager +#include "gfxContext.h" // for gfxContext, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxRect.h" // for gfxRect +#include "mozilla/MathAlgorithms.h" // for Abs +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/layers/CompositableForwarder.h" +#include "mozilla/layers/ShadowLayers.h" // for ShadowLayerForwarder +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for gfxContext::AddRef, etc +#include "nsSize.h" // for nsIntSize #ifdef GFX_TILEDLAYER_DEBUG_OVERLAY #include "cairo.h" diff --git a/gfx/layers/client/TiledContentClient.h b/gfx/layers/client/TiledContentClient.h index 37235587052c..7d155e055524 100644 --- a/gfx/layers/client/TiledContentClient.h +++ b/gfx/layers/client/TiledContentClient.h @@ -6,9 +6,29 @@ #ifndef MOZILLA_GFX_TILEDCONTENTCLIENT_H #define MOZILLA_GFX_TILEDCONTENTCLIENT_H -#include "mozilla/layers/ContentClient.h" -#include "TiledLayerBuffer.h" -#include "gfxPlatform.h" +#include // for size_t +#include // for uint16_t +#include // for swap +#include "Layers.h" // for LayerManager, etc +#include "TiledLayerBuffer.h" // for TiledLayerBuffer +#include "Units.h" // for CSSPoint +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPoint.h" // for gfxSize +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/CompositableClient.h" // for CompositableClient +#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc +#include "mozilla/layers/TextureClient.h" +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc +#include "nsTraceRefcnt.h" // for MOZ_COUNT_DTOR +#include "gfxReusableSurfaceWrapper.h" namespace mozilla { namespace layers { diff --git a/gfx/layers/composite/APZCTreeManager.cpp b/gfx/layers/composite/APZCTreeManager.cpp index dfe107a23e6a..81c54609c981 100644 --- a/gfx/layers/composite/APZCTreeManager.cpp +++ b/gfx/layers/composite/APZCTreeManager.cpp @@ -5,8 +5,19 @@ #include "APZCTreeManager.h" #include "AsyncCompositionManager.h" // for ViewTransform -#include "LayerManagerComposite.h" // for AsyncCompositionManager.h -#include "Compositor.h" +#include "Compositor.h" // for Compositor +#include "CompositorParent.h" // for CompositorParent, etc +#include "InputData.h" // for InputData, etc +#include "Layers.h" // for ContainerLayer, Layer, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "mozilla/dom/Touch.h" // for Touch +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/layers/AsyncPanZoomController.h" +#include "mozilla/mozalloc.h" // for operator new +#include "nsGUIEvent.h" // for nsMouseEvent, nsTouchEvent, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc +#include "nsThreadUtils.h" // for NS_IsMainThread #define APZC_LOG(...) // #define APZC_LOG(args...) printf_stderr(args) @@ -21,6 +32,10 @@ APZCTreeManager::APZCTreeManager() AsyncPanZoomController::InitializeGlobalState(); } +APZCTreeManager::~APZCTreeManager() +{ +} + void APZCTreeManager::AssertOnCompositorThread() { diff --git a/gfx/layers/composite/APZCTreeManager.h b/gfx/layers/composite/APZCTreeManager.h index 2ac334fc1179..ff1b13e876fd 100644 --- a/gfx/layers/composite/APZCTreeManager.h +++ b/gfx/layers/composite/APZCTreeManager.h @@ -6,13 +6,28 @@ #ifndef mozilla_layers_APZCTreeManager_h #define mozilla_layers_APZCTreeManager_h -#include "mozilla/layers/AsyncPanZoomController.h" -#include "Layers.h" -#include "CompositorParent.h" +#include // for uint64_t, uint32_t +#include "FrameMetrics.h" // for FrameMetrics, etc +#include "Units.h" // for CSSPoint, CSSRect, etc +#include "gfxPoint.h" // for gfxPoint +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Monitor.h" // for Monitor +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsEvent.h" // for nsEventStatus +#include "nsISupportsImpl.h" +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc + +class gfx3DMatrix; +class nsInputEvent; +template class nsTArray; namespace mozilla { +class InputData; + namespace layers { +class Layer; class AsyncPanZoomController; class CompositorParent; @@ -101,7 +116,7 @@ class APZCTreeManager { public: APZCTreeManager(); - virtual ~APZCTreeManager() {} + virtual ~APZCTreeManager(); /** * Rebuild the APZC tree based on the layer update that just came up. Preserve diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index c2f6b076fe84..625953084948 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -5,21 +5,41 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/AsyncCompositionManager.h" -#include "base/basictypes.h" - +#include // for uint32_t +#include "AnimationCommon.h" // for ComputedTimingFunction +#include "CompositorParent.h" // for CompositorParent, etc +#include "FrameMetrics.h" // for FrameMetrics +#include "LayerManagerComposite.h" // for LayerManagerComposite, etc +#include "Layers.h" // for Layer, ContainerLayer, etc +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPoint.h" // for gfxPoint, gfxSize +#include "gfxPoint3D.h" // for gfxPoint3D +#include "mozilla/WidgetUtils.h" // for ComputeTransformForRotation +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/Point.h" // for RoundedToInt, PointTyped +#include "mozilla/gfx/Rect.h" // for RoundedToInt, RectTyped +#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor +#include "mozilla/layers/AsyncPanZoomController.h" +#include "mozilla/layers/Compositor.h" // for Compositor +#include "nsAnimationManager.h" // for ElementAnimations +#include "nsCSSPropList.h" +#include "nsCoord.h" // for NSAppUnitsToFloatPixels, etc +#include "nsDebug.h" // for NS_ASSERTION, etc +#include "nsDeviceContext.h" // for nsDeviceContext +#include "nsDisplayList.h" // for nsDisplayTransform, etc +#include "nsMathUtils.h" // for NS_round +#include "nsPoint.h" // for nsPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsStyleAnimation.h" // for nsStyleAnimation::Value, etc +#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc +#include "nsTArrayForwardDeclare.h" // for InfallibleTArray #if defined(MOZ_WIDGET_ANDROID) # include # include "AndroidBridge.h" #endif -#include "CompositorParent.h" -#include "LayerManagerComposite.h" - -#include "nsStyleAnimation.h" -#include "nsDisplayList.h" -#include "AnimationCommon.h" -#include "nsAnimationManager.h" -#include "mozilla/layers/AsyncPanZoomController.h" +struct nsCSSValueList; using namespace mozilla::dom; diff --git a/gfx/layers/composite/AsyncCompositionManager.h b/gfx/layers/composite/AsyncCompositionManager.h index 7cf0b29dd2a9..3d491763a5a3 100644 --- a/gfx/layers/composite/AsyncCompositionManager.h +++ b/gfx/layers/composite/AsyncCompositionManager.h @@ -6,23 +6,24 @@ #ifndef GFX_ASYNCCOMPOSITIONMANAGER_H #define GFX_ASYNCCOMPOSITIONMANAGER_H -#include "gfxPoint.h" -#include "gfx3DMatrix.h" -#include "nsAutoPtr.h" -#include "nsRect.h" -#include "mozilla/dom/ScreenOrientation.h" -#include "mozilla/gfx/Rect.h" -#include "mozilla/Attributes.h" -#include "mozilla/RefPtr.h" -#include "mozilla/TimeStamp.h" -#include "mozilla/layers/LayerTransaction.h" // for TargetConfig +#include "GeckoProfilerFunc.h" // for TimeStamp +#include "Units.h" // for LayerPoint, etc +#include "mozilla/layers/LayerManagerComposite.h" // for LayerManagerComposite +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "mozilla/Attributes.h" // for MOZ_DELETE, MOZ_FINAL, etc +#include "mozilla/RefPtr.h" // for RefCounted +#include "mozilla/TimeStamp.h" // for TimeStamp +#include "mozilla/dom/ScreenOrientation.h" // for ScreenOrientation +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/layers/LayerTransaction.h" // for TargetConfig +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" // for LayerManager::AddRef, etc +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { -class AsyncPanZoomController; class Layer; -class LayerManagerComposite; class AutoResolveRefLayers; // Represents (affine) transforms that are calculated from a content view. diff --git a/gfx/layers/composite/CanvasLayerComposite.cpp b/gfx/layers/composite/CanvasLayerComposite.cpp index 4cf674a35771..2eeb3d24607f 100644 --- a/gfx/layers/composite/CanvasLayerComposite.cpp +++ b/gfx/layers/composite/CanvasLayerComposite.cpp @@ -3,16 +3,23 @@ * 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 "ipc/AutoOpenSurface.h" -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/ShadowLayers.h" -#include "mozilla/layers/CompositorTypes.h" // for TextureInfo -#include "mozilla/layers/Effects.h" - #include "CanvasLayerComposite.h" -#include "ImageHost.h" -#include "gfxUtils.h" -#include "gfx2DGlue.h" +#include "composite/CompositableHost.h" // for CompositableHost +#include "gfx2DGlue.h" // for ToFilter, ToMatrix4x4 +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPattern.h" // for gfxPattern, etc +#include "gfxUtils.h" // for gfxUtils, etc +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/Effects.h" // for EffectChain +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsPoint.h" // for nsIntPoint +#include "nsString.h" // for nsAutoCString +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla; using namespace mozilla::layers; diff --git a/gfx/layers/composite/CanvasLayerComposite.h b/gfx/layers/composite/CanvasLayerComposite.h index 2de04c4da4c7..4fbd3d5b5738 100644 --- a/gfx/layers/composite/CanvasLayerComposite.h +++ b/gfx/layers/composite/CanvasLayerComposite.h @@ -6,16 +6,20 @@ #ifndef GFX_CanvasLayerComposite_H #define GFX_CanvasLayerComposite_H - -#include "mozilla/layers/LayerManagerComposite.h" -#include "gfxASurface.h" -#if defined(MOZ_WIDGET_GTK2) && !defined(MOZ_PLATFORM_MAEMO) -#include "mozilla/X11Util.h" -#endif +#include "Layers.h" // for CanvasLayer, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/LayerManagerComposite.h" // for LayerComposite, etc +#include "mozilla/layers/LayersTypes.h" // for LayerRenderState, etc +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsRect.h" // for nsIntRect +#include "nscore.h" // for nsACString +struct nsIntPoint; namespace mozilla { namespace layers { +class CompositableHost; // Canvas layers use ImageHosts (but CanvasClients) because compositing a // canvas is identical to compositing an image. class ImageHost; diff --git a/gfx/layers/composite/ColorLayerComposite.cpp b/gfx/layers/composite/ColorLayerComposite.cpp index cc539b1c5800..2cd2f30cd5ec 100644 --- a/gfx/layers/composite/ColorLayerComposite.cpp +++ b/gfx/layers/composite/ColorLayerComposite.cpp @@ -4,8 +4,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ColorLayerComposite.h" -#include "mozilla/layers/Effects.h" -#include "gfx2DGlue.h" +#include "gfx2DGlue.h" // for ToMatrix4x4 +#include "gfxColor.h" // for gfxRGBA +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for Color +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/CompositorTypes.h" // for DIAGNOSTIC_COLOR +#include "mozilla/layers/Effects.h" // for Effect, EffectChain, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect namespace mozilla { namespace layers { diff --git a/gfx/layers/composite/ColorLayerComposite.h b/gfx/layers/composite/ColorLayerComposite.h index 468c50b8fd00..f3e44acc9b92 100644 --- a/gfx/layers/composite/ColorLayerComposite.h +++ b/gfx/layers/composite/ColorLayerComposite.h @@ -6,14 +6,19 @@ #ifndef GFX_ColorLayerComposite_H #define GFX_ColorLayerComposite_H -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/ShadowLayers.h" +#include "Layers.h" // for ColorLayer, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/layers/LayerManagerComposite.h" // for LayerComposite, etc +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_HAVE_LOG +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc -#include "mozilla/layers/LayerManagerComposite.h" +struct nsIntPoint; +struct nsIntRect; namespace mozilla { namespace layers { +class CompositableHost; class ColorLayerComposite : public ColorLayer, public LayerComposite diff --git a/gfx/layers/composite/CompositableHost.cpp b/gfx/layers/composite/CompositableHost.cpp index cdf114dc7dc7..ee62f49956fc 100644 --- a/gfx/layers/composite/CompositableHost.cpp +++ b/gfx/layers/composite/CompositableHost.cpp @@ -4,16 +4,25 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CompositableHost.h" -#include "ImageHost.h" -#include "ContentHost.h" -#include "TiledContentHost.h" -#include "Effects.h" -#include "mozilla/layers/CompositableTransactionParent.h" -#include "mozilla/layers/TextureHost.h" +#include // for _Rb_tree_iterator, map, etc +#include // for pair +#include "ContentHost.h" // for ContentHostDoubleBuffered, etc +#include "Effects.h" // for EffectMask, Effect, etc +#include "ImageHost.h" // for DeprecatedImageHostBuffered, etc +#include "TiledContentHost.h" // for TiledContentHost +#include "gfxImageSurface.h" // for gfxImageSurface +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/TextureHost.h" // for TextureHost, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_WARNING +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { +class Matrix4x4; +class Compositor; + CompositableHost::CompositableHost(const TextureInfo& aTextureInfo) : mTextureInfo(aTextureInfo) , mCompositor(nullptr) diff --git a/gfx/layers/composite/CompositableHost.h b/gfx/layers/composite/CompositableHost.h index b7d2502315b7..ae6a675d10ce 100644 --- a/gfx/layers/composite/CompositableHost.h +++ b/gfx/layers/composite/CompositableHost.h @@ -6,14 +6,35 @@ #ifndef MOZILLA_GFX_BUFFERHOST_H #define MOZILLA_GFX_BUFFERHOST_H -#include "mozilla/layers/Compositor.h" +#include // for uint64_t +#include // for FILE +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "gfxPoint.h" // for gfxSize +#include "gfxRect.h" // for gfxRect +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, RefCounted, etc +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for Filter +#include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc +#include "mozilla/layers/LayersTypes.h" // for LayerRenderState, etc #include "mozilla/layers/PCompositableParent.h" -#include "mozilla/layers/ISurfaceAllocator.h" -#include "ThebesLayerBuffer.h" -#include "ClientTiledThebesLayer.h" // for BasicTiledLayerBuffer -#include "mozilla/RefPtr.h" +#include "mozilla/mozalloc.h" // for operator delete +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsRegion.h" // for nsIntRegion +#include "nscore.h" // for nsACString + +class gfxImageSurface; +struct nsIntPoint; +struct nsIntRect; namespace mozilla { +namespace gfx { +class Matrix4x4; +} + namespace layers { // Some properties of a Layer required for tiling @@ -31,6 +52,11 @@ class Layer; class DeprecatedTextureHost; class TextureHost; class SurfaceDescriptor; +class Compositor; +class ISurfaceAllocator; +class ThebesBufferData; +class TiledLayerComposer; +struct EffectChain; /** * The compositor-side counterpart to CompositableClient. Responsible for diff --git a/gfx/layers/composite/ContainerLayerComposite.cpp b/gfx/layers/composite/ContainerLayerComposite.cpp index 21472e48404c..35ab859f28d2 100644 --- a/gfx/layers/composite/ContainerLayerComposite.cpp +++ b/gfx/layers/composite/ContainerLayerComposite.cpp @@ -4,10 +4,35 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ContainerLayerComposite.h" -#include "gfxUtils.h" -#include "mozilla/layers/Compositor.h" -#include "mozilla/layers/LayersTypes.h" -#include "gfx2DGlue.h" +#include // for min +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "FrameMetrics.h" // for FrameMetrics +#include "Units.h" // for LayerRect, LayerPixel, etc +#include "gfx2DGlue.h" // for ToMatrix4x4 +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxUtils.h" // for gfxUtils, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Point.h" // for Point, IntPoint +#include "mozilla/gfx/Rect.h" // for IntRect, Rect +#include "mozilla/layers/Compositor.h" // for Compositor, etc +#include "mozilla/layers/CompositorTypes.h" // for DIAGNOSTIC_CONTAINER +#include "mozilla/layers/Effects.h" // for Effect, EffectChain, etc +#include "mozilla/layers/TextureHost.h" // for CompositingRenderTarget +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsUtils.h" // for NS_ADDREF, NS_RELEASE +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsAutoTArray +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/composite/ContainerLayerComposite.h b/gfx/layers/composite/ContainerLayerComposite.h index da7d6462182c..1b587a4e2ec0 100644 --- a/gfx/layers/composite/ContainerLayerComposite.h +++ b/gfx/layers/composite/ContainerLayerComposite.h @@ -6,19 +6,20 @@ #ifndef GFX_ContainerLayerComposite_H #define GFX_ContainerLayerComposite_H -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/ShadowLayers.h" - -#include "Layers.h" +#include "Layers.h" // for Layer (ptr only), etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE #include "mozilla/layers/LayerManagerComposite.h" -#include "mozilla/layers/Effects.h" +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_HAVE_LOG -#include "gfxUtils.h" -#include "gfx2DGlue.h" +class gfx3DMatrix; +struct nsIntPoint; +struct nsIntRect; namespace mozilla { namespace layers { +class CompositableHost; + class ContainerLayerComposite : public ContainerLayer, public LayerComposite { diff --git a/gfx/layers/composite/ContentHost.cpp b/gfx/layers/composite/ContentHost.cpp index 42692f160330..8c5253e49441 100644 --- a/gfx/layers/composite/ContentHost.cpp +++ b/gfx/layers/composite/ContentHost.cpp @@ -4,12 +4,26 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/ContentHost.h" -#include "mozilla/layers/Effects.h" -#include "nsPrintfCString.h" -#include "gfx2DGlue.h" +#include "LayersLogging.h" // for AppendToString +#include "gfx2DGlue.h" // for ContentForFormat +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/Effects.h" // for TexturedEffect, Effect, etc +#include "mozilla/layers/LayerTransaction.h" // for ThebesBufferData +#include "nsAString.h" +#include "nsPrintfCString.h" // for nsPrintfCString +#include "nsString.h" // for nsAutoCString + +class gfxImageSurface; namespace mozilla { +namespace gfx { +class Matrix4x4; +} using namespace gfx; + namespace layers { ContentHostBase::ContentHostBase(const TextureInfo& aTextureInfo) diff --git a/gfx/layers/composite/ContentHost.h b/gfx/layers/composite/ContentHost.h index ee165c87710d..2bcab30ed685 100644 --- a/gfx/layers/composite/ContentHost.h +++ b/gfx/layers/composite/ContentHost.h @@ -6,14 +6,45 @@ #ifndef GFX_CONTENTHOST_H #define GFX_CONTENTHOST_H -#include "ThebesLayerBuffer.h" -#include "CompositableHost.h" +#include // for uint32_t +#include // for FILE +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "CompositableHost.h" // for CompositableHost, etc +#include "ThebesLayerBuffer.h" // for ThebesLayerBuffer, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for Filter +#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_HAVE_LOG, etc +#include "mozilla/layers/TextureHost.h" // for DeprecatedTextureHost +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsAutoPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsTArray +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +#include "nscore.h" // for nsACString + +class gfxImageSurface; namespace mozilla { +namespace gfx { +class Matrix4x4; +} namespace layers { +class Compositor; +class ThebesBufferData; +class TiledLayerComposer; +struct EffectChain; -class ThebesBuffer; -class OptionalThebesBuffer; struct TexturedEffect; /** diff --git a/gfx/layers/composite/ImageHost.cpp b/gfx/layers/composite/ImageHost.cpp index 610616566ca9..d7b829f1d175 100644 --- a/gfx/layers/composite/ImageHost.cpp +++ b/gfx/layers/composite/ImageHost.cpp @@ -3,19 +3,31 @@ * 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 "ipc/AutoOpenSurface.h" #include "ImageHost.h" +#include "LayersLogging.h" // for AppendToString +#include "composite/CompositableHost.h" // for CompositableHost, etc +#include "ipc/IPCMessageUtils.h" // for null_t +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/Effects.h" // for TexturedEffect, Effect, etc +#include "nsAString.h" +#include "nsDebug.h" // for NS_WARNING, NS_ASSERTION +#include "nsPrintfCString.h" // for nsPrintfCString +#include "nsString.h" // for nsAutoCString -#include "mozilla/layers/Effects.h" -#include "LayersLogging.h" -#include "nsPrintfCString.h" +class gfxImageSurface; +class nsIntRegion; namespace mozilla { +namespace gfx { +class Matrix4x4; +} using namespace gfx; namespace layers { +class ISurfaceAllocator; + ImageHost::ImageHost(const TextureInfo& aTextureInfo) : CompositableHost(aTextureInfo) , mFrontBuffer(nullptr) diff --git a/gfx/layers/composite/ImageHost.h b/gfx/layers/composite/ImageHost.h index 0f4df2b5179b..d301dfd54b28 100644 --- a/gfx/layers/composite/ImageHost.h +++ b/gfx/layers/composite/ImageHost.h @@ -6,13 +6,35 @@ #ifndef MOZILLA_GFX_IMAGEHOST_H #define MOZILLA_GFX_IMAGEHOST_H -#include "CompositableHost.h" -#include "mozilla/layers/LayerManagerComposite.h" +#include // for FILE, NULL +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "CompositableHost.h" // for CompositableHost +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for Filter +#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/LayersTypes.h" // for LayerRenderState, etc +#include "mozilla/layers/TextureHost.h" // for DeprecatedTextureHost, etc +#include "mozilla/mozalloc.h" // for operator delete +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsRect.h" // for nsIntRect +#include "nscore.h" // for nsACString + +class gfxImageSurface; +class nsIntRegion; namespace mozilla { +namespace gfx { +class Matrix4x4; +} namespace layers { -class TextureHost; +class Compositor; +class ISurfaceAllocator; +struct EffectChain; /** * ImageHost. Works with ImageClientSingle and ImageClientBuffered diff --git a/gfx/layers/composite/ImageLayerComposite.cpp b/gfx/layers/composite/ImageLayerComposite.cpp index d77bec93082a..5124f0f118a0 100644 --- a/gfx/layers/composite/ImageLayerComposite.cpp +++ b/gfx/layers/composite/ImageLayerComposite.cpp @@ -3,19 +3,31 @@ * 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 "gfxSharedImageSurface.h" - -#include "ipc/AutoOpenSurface.h" #include "ImageLayerComposite.h" -#include "ImageHost.h" -#include "gfxImageSurface.h" -#include "gfx2DGlue.h" -#include "gfxUtils.h" - -#include "mozilla/layers/Compositor.h" -#include "mozilla/layers/CompositorTypes.h" // for TextureInfo -#include "mozilla/layers/Effects.h" -#include "CompositableHost.h" +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "CompositableHost.h" // for CompositableHost +#include "Layers.h" // for WriteSnapshotToDumpFile, etc +#include "gfx2DGlue.h" // for ToFilter, ToMatrix4x4 +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPoint.h" // for gfxIntSize +#include "gfxRect.h" // for gfxRect +#include "gfxUtils.h" // for gfxUtils, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Point.h" // for IntSize, Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/Effects.h" // for EffectChain +#include "mozilla/layers/TextureHost.h" // for DeprecatedTextureHost, etc +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_ASSERTION +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsString.h" // for nsAutoCString +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::gfx; diff --git a/gfx/layers/composite/ImageLayerComposite.h b/gfx/layers/composite/ImageLayerComposite.h index 59636d6c021e..170487713521 100644 --- a/gfx/layers/composite/ImageLayerComposite.h +++ b/gfx/layers/composite/ImageLayerComposite.h @@ -6,17 +6,25 @@ #ifndef GFX_ImageLayerComposite_H #define GFX_ImageLayerComposite_H -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/ShadowLayers.h" +#include "GLTextureImage.h" // for TextureImage +#include "ImageLayers.h" // for ImageLayer +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/LayerManagerComposite.h" // for LayerComposite, etc +#include "mozilla/layers/LayersTypes.h" // for LayerRenderState, etc +#include "nsISupportsImpl.h" // for TextureImage::AddRef, etc +#include "nscore.h" // for nsACString -#include "mozilla/layers/LayerManagerComposite.h" -#include "ImageLayers.h" -#include "mozilla/Mutex.h" +class gfx3DMatrix; +struct nsIntPoint; +struct nsIntRect; namespace mozilla { namespace layers { +class CompositableHost; class ImageHost; +class Layer; class ImageLayerComposite : public ImageLayer, public LayerComposite diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index 9ff1d5fd6349..cac3de38074b 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -3,50 +3,65 @@ * 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/PLayerTransaction.h" - -// This must occur *after* layers/PLayerTransaction.h to avoid -// typedefs conflicts. -#include "mozilla/Util.h" - -#include "mozilla/layers/LayerManagerComposite.h" -#include "ThebesLayerComposite.h" -#include "ContainerLayerComposite.h" -#include "ImageLayerComposite.h" -#include "ColorLayerComposite.h" -#include "CanvasLayerComposite.h" -#include "CompositableHost.h" -#include "mozilla/gfx/Matrix.h" -#include "mozilla/TimeStamp.h" -#include "mozilla/Preferences.h" -#include "mozilla/layers/ImageHost.h" -#include "mozilla/layers/ContentHost.h" -#include "mozilla/layers/Compositor.h" - -#include "gfxContext.h" -#include "gfxUtils.h" -#include "gfx2DGlue.h" +#include "LayerManagerComposite.h" +#include // for size_t +#include // for uint16_t, uint32_t +#include "CanvasLayerComposite.h" // for CanvasLayerComposite +#include "ColorLayerComposite.h" // for ColorLayerComposite +#include "Composer2D.h" // for Composer2D +#include "CompositableHost.h" // for CompositableHost +#include "ContainerLayerComposite.h" // for ContainerLayerComposite, etc +#include "FrameMetrics.h" // for FrameMetrics +#include "GeckoProfilerImpl.h" // for profiler_set_frame_number, etc +#include "ImageLayerComposite.h" // for ImageLayerComposite +#include "Layers.h" // for Layer, ContainerLayer, etc +#include "ThebesLayerComposite.h" // for ThebesLayerComposite +#include "TiledLayerBuffer.h" // for TiledLayerComposer +#include "Units.h" // for ScreenIntRect +#include "gfx2DGlue.h" // for ToMatrix4x4 +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPlatform.h" // for gfxPlatform #ifdef XP_MACOSX #include "gfxPlatformMac.h" -#else -#include "gfxPlatform.h" #endif - -#include "nsIWidget.h" -#include "nsIServiceManager.h" -#include "nsIConsoleService.h" - -#include "gfxCrashReporterUtils.h" - -#include "GeckoProfiler.h" - +#include "gfxPoint.h" // for gfxIntSize +#include "gfxRect.h" // for gfxRect +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Point.h" // for IntSize, Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for Color, SurfaceFormat +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/Effects.h" // for Effect, EffectChain, etc +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_HAVE_LOG, etc +#include "ipc/ShadowLayerUtils.h" +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_WARNING, NS_RUNTIMEABORT, etc +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsIWidget.h" // for nsIWidget +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion, etc #ifdef MOZ_WIDGET_ANDROID #include #endif +class gfxASurface; +class gfxContext; +struct nsIntSize; + + namespace mozilla { namespace layers { +class ImageLayer; + using namespace mozilla::gfx; using namespace mozilla::gl; diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index b5205538e873..c27c7b69053e 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -6,39 +6,63 @@ #ifndef GFX_LayerManagerComposite_H #define GFX_LayerManagerComposite_H -#include "mozilla/layers/Compositor.h" -#include "mozilla/layers/ShadowLayers.h" -#include "Composer2D.h" -#include "mozilla/TimeStamp.h" +#include // for int32_t, uint32_t +#include "GLDefs.h" // for GLenum #include "Layers.h" +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/LayersTypes.h" // for LayersBackend, etc +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nscore.h" // for nsAString, etc + +class gfxASurface; +class gfxContext; +struct nsIntPoint; +struct nsIntSize; #ifdef XP_WIN #include #endif -#include "gfxContext.h" -#include "gfx3DMatrix.h" -#include "GLDefs.h" - namespace mozilla { +namespace gfx { +class DrawTarget; +} + namespace gl { class GLContext; class TextureImage; } -} -namespace mozilla { namespace layers { -class LayerComposite; -class ThebesLayerComposite; -class ContainerLayerComposite; -class ImageLayerComposite; class CanvasLayerComposite; class ColorLayerComposite; -class RefLayerComposite; +class Composer2D; class CompositableHost; +class Compositor; +class ContainerLayerComposite; class EffectChain; +class ImageLayer; +class ImageLayerComposite; +class LayerComposite; +class RefLayerComposite; +class SurfaceDescriptor; +class ThebesLayerComposite; class TiledLayerComposer; class LayerManagerComposite : public LayerManager diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index 3c1091597fce..fbe6a6ef933d 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -4,16 +4,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/TextureHost.h" -#include "mozilla/layers/LayersSurfaces.h" -#include "LayersLogging.h" -#include "nsPrintfCString.h" -#include "mozilla/ipc/Shmem.h" -#include "ipc/AutoOpenSurface.h" +#include "LayersLogging.h" // for AppendToString +#include "gfx2DGlue.h" // for ToIntSize +#include "gfxImageSurface.h" // for gfxImageSurface +#include "mozilla/gfx/2D.h" // for DataSourceSurface, Factory +#include "mozilla/ipc/Shmem.h" // for Shmem +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator #include "mozilla/layers/ImageDataSerializer.h" +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc #include "mozilla/layers/YCbCrImageDataSerializer.h" -#include "gfx2DGlue.h" -#include "mozilla/gfx/2D.h" +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsPrintfCString.h" // for nsPrintfCString +struct nsIntPoint; namespace mozilla { namespace layers { diff --git a/gfx/layers/composite/TextureHost.h b/gfx/layers/composite/TextureHost.h index 9901b8c38b24..2b70742587a1 100644 --- a/gfx/layers/composite/TextureHost.h +++ b/gfx/layers/composite/TextureHost.h @@ -6,25 +6,37 @@ #ifndef MOZILLA_GFX_TEXTUREHOST_H #define MOZILLA_GFX_TEXTUREHOST_H -#include "mozilla/layers/LayersTypes.h" -#include "nsRect.h" -#include "nsRegion.h" -#include "mozilla/gfx/Rect.h" -#include "mozilla/layers/CompositorTypes.h" -#include "nsAutoPtr.h" -#include "mozilla/RefPtr.h" -#include "mozilla/layers/ISurfaceAllocator.h" +#include // for size_t +#include // for uint64_t, uint32_t, uint8_t +#include "./../mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "gfxASurface.h" // for gfxASurface, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef, etc +#include "mozilla/gfx/2D.h" // for DataSourceSurface +#include "mozilla/gfx/Point.h" // for IntSize, IntPoint +#include "mozilla/gfx/Types.h" // for SurfaceFormat, etc +#include "mozilla/layers/CompositorTypes.h" // for TextureFlags, etc +#include "mozilla/layers/LayersTypes.h" // for LayerRenderState, etc +#include "mozilla/mozalloc.h" // for operator delete +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +#include "nscore.h" // for nsACString -class gfxReusableSurfaceWrapper; class gfxImageSurface; +class gfxReusableSurfaceWrapper; +struct nsIntPoint; +struct nsIntSize; + namespace mozilla { -namespace gfx { -class DataSourceSurface; -} +namespace ipc { +class Shmem; } -namespace mozilla { namespace layers { class Compositor; diff --git a/gfx/layers/composite/ThebesLayerComposite.cpp b/gfx/layers/composite/ThebesLayerComposite.cpp index 3e410b8380e1..fd92f51fa939 100644 --- a/gfx/layers/composite/ThebesLayerComposite.cpp +++ b/gfx/layers/composite/ThebesLayerComposite.cpp @@ -3,28 +3,38 @@ * 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 "ipc/AutoOpenSurface.h" -#include "mozilla/layers/PLayerTransaction.h" -#include "TiledLayerBuffer.h" - -// This must occur *after* layers/PLayerTransaction.h to avoid -// typedefs conflicts. -#include "mozilla/Util.h" - -#include "mozilla/layers/ShadowLayers.h" - -#include "ThebesLayerBuffer.h" #include "ThebesLayerComposite.h" -#include "mozilla/layers/ContentHost.h" -#include "gfxUtils.h" -#include "gfx2DGlue.h" - -#include "mozilla/layers/CompositorTypes.h" // for TextureInfo -#include "mozilla/layers/Effects.h" +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "CompositableHost.h" // for TiledLayerProperties, etc +#include "FrameMetrics.h" // for FrameMetrics +#include "Units.h" // for CSSRect, LayerPixel, etc +#include "gfx2DGlue.h" // for ToMatrix4x4 +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxUtils.h" // for gfxUtils, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/gfx/Rect.h" // for RoundedToInt, Rect +#include "mozilla/gfx/Types.h" // for Filter::FILTER_LINEAR +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/ContentHost.h" // for ContentHost +#include "mozilla/layers/Effects.h" // for EffectChain +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsMathUtils.h" // for NS_lround +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "nsString.h" // for nsAutoCString +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc namespace mozilla { namespace layers { +class TiledLayerComposer; + ThebesLayerComposite::ThebesLayerComposite(LayerManagerComposite *aManager) : ThebesLayer(aManager, nullptr) , LayerComposite(aManager) diff --git a/gfx/layers/composite/ThebesLayerComposite.h b/gfx/layers/composite/ThebesLayerComposite.h index 531b3492f9b6..959d200706a4 100644 --- a/gfx/layers/composite/ThebesLayerComposite.h +++ b/gfx/layers/composite/ThebesLayerComposite.h @@ -6,12 +6,19 @@ #ifndef GFX_ThebesLayerComposite_H #define GFX_ThebesLayerComposite_H -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/ShadowLayers.h" +#include "Layers.h" // for Layer (ptr only), etc +#include "gfxPoint.h" // for gfxSize +#include "gfxRect.h" // for gfxRect +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/LayerManagerComposite.h" // for LayerComposite, etc +#include "mozilla/layers/LayersTypes.h" // for LayerRenderState, etc +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsRegion.h" // for nsIntRegion +#include "nscore.h" // for nsACString -#include "Layers.h" -#include "mozilla/layers/LayerManagerComposite.h" -#include "base/task.h" +struct nsIntPoint; +struct nsIntRect; namespace mozilla { @@ -23,7 +30,9 @@ namespace layers { * non-tiled Thebes layers and single or double buffering. */ +class CompositableHost; class ContentHost; +class TiledLayerComposer; class ThebesLayerComposite : public ThebesLayer, public LayerComposite diff --git a/gfx/layers/composite/TiledContentHost.cpp b/gfx/layers/composite/TiledContentHost.cpp index 7f569ea03a82..e3d810c26515 100644 --- a/gfx/layers/composite/TiledContentHost.cpp +++ b/gfx/layers/composite/TiledContentHost.cpp @@ -4,14 +4,26 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "TiledContentHost.h" -#include "mozilla/layers/Effects.h" -#include "nsPrintfCString.h" -#include "ThebesLayerComposite.h" +#include "ThebesLayerComposite.h" // for ThebesLayerComposite +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/Effects.h" // for TexturedEffect, Effect, etc +#include "nsAString.h" +#include "nsDebug.h" // for NS_WARNING +#include "nsPoint.h" // for nsIntPoint +#include "nsPrintfCString.h" // for nsPrintfCString +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize + +class gfxReusableSurfaceWrapper; namespace mozilla { using namespace gfx; namespace layers { +class Layer; + void TiledLayerBufferComposite::Upload(const BasicTiledLayerBuffer* aMainMemoryTiledBuffer, const nsIntRegion& aNewValidRegion, diff --git a/gfx/layers/composite/TiledContentHost.h b/gfx/layers/composite/TiledContentHost.h index 9fcbb1b33dfd..54b9c1caa09a 100644 --- a/gfx/layers/composite/TiledContentHost.h +++ b/gfx/layers/composite/TiledContentHost.h @@ -6,16 +6,46 @@ #ifndef GFX_TILEDCONTENTHOST_H #define GFX_TILEDCONTENTHOST_H -#include "ContentHost.h" -#include "ClientTiledThebesLayer.h" // for BasicTiledLayerBuffer -#include "mozilla/layers/TextureHost.h" +#include // for uint16_t +#include // for FILE +#include // for swap +#include "ContentHost.h" // for ContentHost +#include "TiledLayerBuffer.h" // for TiledLayerBuffer, etc +#include "CompositableHost.h" +#include "gfxPoint.h" // for gfxSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/Point.h" // for Point +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" // for Filter +#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/LayersTypes.h" // for LayerRenderState, etc +#include "mozilla/layers/TextureHost.h" // for DeprecatedTextureHost +#include "mozilla/layers/TiledContentClient.h" +#include "mozilla/mozalloc.h" // for operator delete +#include "nsRegion.h" // for nsIntRegion +#include "nscore.h" // for nsACString + +class gfxReusableSurfaceWrapper; +struct nsIntPoint; +struct nsIntRect; +struct nsIntSize; namespace mozilla { +namespace gfx { +class Matrix4x4; +} + namespace layers { -class ThebesBuffer; -class OptionalThebesBuffer; -struct TexturedEffect; +class Compositor; +class ISurfaceAllocator; +class Layer; +class ThebesBufferData; +class TiledThebesLayerComposite; +struct EffectChain; class TiledTexture { public: @@ -106,8 +136,6 @@ private: gfxSize mFrameResolution; }; -class TiledThebesLayerComposite; - /** * ContentHost for tiled Thebes layers. Since tiled layers are special snow * flakes, we don't call UpdateThebes or AddTextureHost, etc. We do call Composite diff --git a/gfx/layers/ipc/AsyncPanZoomController.cpp b/gfx/layers/ipc/AsyncPanZoomController.cpp index c31a822ef07b..500d178fa4ff 100644 --- a/gfx/layers/ipc/AsyncPanZoomController.cpp +++ b/gfx/layers/ipc/AsyncPanZoomController.cpp @@ -4,23 +4,54 @@ * 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/AsyncCompositionManager.h" // for ViewTransform -#include "CompositorParent.h" -#include "mozilla/gfx/2D.h" -#include "mozilla/ClearOnShutdown.h" -#include "mozilla/Constants.h" -#include "mozilla/Util.h" -#include "mozilla/XPCOM.h" -#include "mozilla/Monitor.h" -#include "mozilla/StaticPtr.h" -#include "AsyncPanZoomController.h" -#include "GestureEventListener.h" -#include "nsIThreadManager.h" -#include "nsThreadUtils.h" -#include "Layers.h" -#include "AnimationCommon.h" -#include -#include "mozilla/layers/LayerManagerComposite.h" +#include // for fabsf, fabs, atan2 +#include // for uint32_t, uint64_t +#include // for int32_t +#include // for max, min +#include "AnimationCommon.h" // for ComputedTimingFunction +#include "AsyncPanZoomController.h" // for AsyncPanZoomController, etc +#include "CompositorParent.h" // for CompositorParent +#include "FrameMetrics.h" // for FrameMetrics, etc +#include "GeckoProfilerFunc.h" // for TimeDuration, TimeStamp +#include "GestureEventListener.h" // for GestureEventListener +#include "InputData.h" // for MultiTouchInput, etc +#include "Units.h" // for CSSRect, CSSPoint, etc +#include "base/message_loop.h" // for MessageLoop +#include "base/task.h" // for NewRunnableMethod, etc +#include "base/tracked.h" // for FROM_HERE +#include "gfxTypes.h" // for gfxFloat +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/ClearOnShutdown.h" // for ClearOnShutdown +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/ReentrantMonitor.h" // for ReentrantMonitorAutoEnter, etc +#include "mozilla/StaticPtr.h" // for StaticAutoPtr +#include "mozilla/TimeStamp.h" // for TimeDuration, TimeStamp +#include "mozilla/dom/Touch.h" // for Touch +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/Point.h" // for Point, RoundedToInt, etc +#include "mozilla/gfx/Rect.h" // for RoundedIn +#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor +#include "mozilla/layers/APZCTreeManager.h" // for ScrollableLayerGuid +#include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform +#include "mozilla/layers/Axis.h" // for AxisX, AxisY, Axis, etc +#include "mozilla/layers/GeckoContentController.h" +#include "mozilla/layers/TaskThrottler.h" // for TaskThrottler +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsAlgorithm.h" // for clamped +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_WARNING +#include "nsEvent.h" +#include "nsGUIEvent.h" // for nsInputEvent, nsTouchEvent, etc +#include "nsISupportsImpl.h" +#include "nsMathUtils.h" // for NS_hypot +#include "nsPoint.h" // for nsIntPoint +#include "nsStyleConsts.h" +#include "nsStyleStruct.h" // for nsTimingFunction +#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc +#include "nsThreadUtils.h" // for NS_IsMainThread +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc using namespace mozilla::css; diff --git a/gfx/layers/ipc/Axis.cpp b/gfx/layers/ipc/Axis.cpp index d28b0246bed4..b506696dc017 100644 --- a/gfx/layers/ipc/Axis.cpp +++ b/gfx/layers/ipc/Axis.cpp @@ -5,10 +5,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "Axis.h" -#include "AsyncPanZoomController.h" -#include "mozilla/Preferences.h" -#include "nsThreadUtils.h" -#include +#include // for fabsf, pow, powf +#include // for max +#include "AsyncPanZoomController.h" // for AsyncPanZoomController +#include "FrameMetrics.h" // for FrameMetrics +#include "GeckoProfilerFunc.h" // for TimeDuration +#include "mozilla/Attributes.h" // for MOZ_FINAL +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/gfx/Rect.h" // for RoundedIn +#include "mozilla/mozalloc.h" // for operator new +#include "nsMathUtils.h" // for NS_lround +#include "nsThreadUtils.h" // for NS_DispatchToMainThread, etc +#include "nscore.h" // for NS_IMETHOD namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/Axis.h b/gfx/layers/ipc/Axis.h index c3eb6a7f6a2b..a02c3eca62c7 100644 --- a/gfx/layers/ipc/Axis.h +++ b/gfx/layers/ipc/Axis.h @@ -7,11 +7,10 @@ #ifndef mozilla_layers_Axis_h #define mozilla_layers_Axis_h -#include "nsGUIEvent.h" -#include "mozilla/TimeStamp.h" -#include "mozilla/gfx/2D.h" -#include "nsTArray.h" -#include "Units.h" +#include // for int32_t +#include "Units.h" // for CSSRect, CSSPoint +#include "mozilla/TimeStamp.h" // for TimeDuration +#include "nsTArray.h" // for nsTArray namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/CompositableForwarder.h b/gfx/layers/ipc/CompositableForwarder.h index 89fc97be3a81..9f2a31944d76 100644 --- a/gfx/layers/ipc/CompositableForwarder.h +++ b/gfx/layers/ipc/CompositableForwarder.h @@ -7,10 +7,16 @@ #ifndef MOZILLA_LAYERS_COMPOSITABLEFORWARDER #define MOZILLA_LAYERS_COMPOSITABLEFORWARDER -#include -#include "gfxASurface.h" -#include "GLDefs.h" -#include "mozilla/layers/ISurfaceAllocator.h" +#include // for int32_t, uint64_t +#include "gfxASurface.h" // for gfxASurface, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator +#include "mozilla/layers/LayersTypes.h" // for LayersBackend +#include "nsRegion.h" // for nsIntRegion + +struct nsIntPoint; +struct nsIntRect; namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/CompositableTransactionParent.cpp b/gfx/layers/ipc/CompositableTransactionParent.cpp index 4d26a5f2ff1b..531fc02ec10e 100644 --- a/gfx/layers/ipc/CompositableTransactionParent.cpp +++ b/gfx/layers/ipc/CompositableTransactionParent.cpp @@ -6,21 +6,30 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CompositableTransactionParent.h" -#include "ShadowLayers.h" -#include "RenderTrace.h" -#include "ShadowLayersManager.h" -#include "CompositableHost.h" -#include "mozilla/layers/ContentHost.h" -#include "ShadowLayerParent.h" -#include "TiledLayerBuffer.h" +#include "CompositableHost.h" // for CompositableParent, etc +#include "CompositorParent.h" // for CompositorParent +#include "Layers.h" // for Layer +#include "RenderTrace.h" // for RenderTraceInvalidateEnd, etc +#include "TiledLayerBuffer.h" // for TiledLayerComposer +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/ContentHost.h" // for ContentHostBase #include "mozilla/layers/LayerManagerComposite.h" +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_LOG +#include "mozilla/layers/TextureHost.h" // for TextureHost #include "mozilla/layers/ThebesLayerComposite.h" -#include "mozilla/layers/TextureHost.h" -#include "CompositorParent.h" +#include "mozilla/mozalloc.h" // for operator delete +#include "nsDebug.h" // for NS_WARNING, NS_ASSERTION +#include "nsRegion.h" // for nsIntRegion namespace mozilla { namespace layers { +class BasicTiledLayerBuffer; +class Compositor; + template CompositableHost* AsCompositable(const T& op) { diff --git a/gfx/layers/ipc/CompositableTransactionParent.h b/gfx/layers/ipc/CompositableTransactionParent.h index aa3807a3b856..296a060182c2 100644 --- a/gfx/layers/ipc/CompositableTransactionParent.h +++ b/gfx/layers/ipc/CompositableTransactionParent.h @@ -5,8 +5,13 @@ * 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/ISurfaceAllocator.h" -#include "mozilla/layers/LayerTransaction.h" +#ifndef MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H +#define MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H + +#include // for vector +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator +#include "mozilla/layers/LayerTransaction.h" // for EditReply, etc namespace mozilla { namespace layers { @@ -28,8 +33,7 @@ protected: bool IsOnCompositorSide() const MOZ_OVERRIDE { return true; } }; - - - } // namespace } // namespace + +#endif diff --git a/gfx/layers/ipc/CompositorChild.cpp b/gfx/layers/ipc/CompositorChild.cpp index c756dc7107b4..d71aa33326da 100644 --- a/gfx/layers/ipc/CompositorChild.cpp +++ b/gfx/layers/ipc/CompositorChild.cpp @@ -5,9 +5,20 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CompositorChild.h" -#include "CompositorParent.h" -#include "LayerManagerOGL.h" +#include // for size_t +#include "Layers.h" // for LayerManager +#include "base/message_loop.h" // for MessageLoop +#include "base/process_util.h" // for OpenProcessHandle +#include "base/task.h" // for NewRunnableMethod, etc +#include "base/tracked.h" // for FROM_HERE #include "mozilla/layers/LayerTransactionChild.h" +#include "mozilla/layers/PLayerTransactionChild.h" +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsIObserver.h" // for nsIObserver +#include "nsTArray.h" // for nsTArray, nsTArray_Impl +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop, etc using mozilla::layers::LayerTransactionChild; diff --git a/gfx/layers/ipc/CompositorChild.h b/gfx/layers/ipc/CompositorChild.h index b19c03bb4d22..1d50d9800304 100644 --- a/gfx/layers/ipc/CompositorChild.h +++ b/gfx/layers/ipc/CompositorChild.h @@ -7,15 +7,22 @@ #ifndef mozilla_layers_CompositorChild_h #define mozilla_layers_CompositorChild_h +#include "base/basictypes.h" // for DISALLOW_EVIL_CONSTRUCTORS +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/layers/PCompositorChild.h" -#include "nsXULAppAPI.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for nsCOMPtr +#include "nsISupportsImpl.h" // for NS_INLINE_DECL_REFCOUNTING + +class nsIObserver; namespace mozilla { namespace layers { class LayerManager; class CompositorParent; -struct TextureFactoryIdentifier; class CompositorChild : public PCompositorChild { diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index d3f5cdebc0db..dd3045519f5a 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -4,26 +4,50 @@ * 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 - -#include "mozilla/DebugOnly.h" - -#include "AutoOpenSurface.h" #include "CompositorParent.h" -#include "mozilla/layers/CompositorOGL.h" -#include "mozilla/layers/BasicCompositor.h" +#include // for fprintf, stdout +#include // for uint64_t +#include // for _Rb_tree_iterator, etc +#include // for pair +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "AutoOpenSurface.h" // for AutoOpenSurface +#include "LayerTransactionParent.h" // for LayerTransactionParent +#include "RenderTrace.h" // for RenderTraceLayers +#include "base/message_loop.h" // for MessageLoop +#include "base/process.h" // for ProcessHandle +#include "base/process_util.h" // for OpenProcessHandle +#include "base/task.h" // for CancelableTask, etc +#include "base/thread.h" // for Thread +#include "base/tracked.h" // for FROM_HERE +#include "gfxContext.h" // for gfxContext +#include "gfxPlatform.h" // for gfxPlatform +#include "ipc/ShadowLayersManager.h" // for ShadowLayersManager +#include "mozilla/AutoRestore.h" // for AutoRestore +#include "mozilla/DebugOnly.h" // for DebugOnly +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/ipc/Transport.h" // for Transport +#include "mozilla/layers/APZCTreeManager.h" // for APZCTreeManager +#include "mozilla/layers/AsyncCompositionManager.h" +#include "mozilla/layers/BasicCompositor.h" // for BasicCompositor +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/CompositorOGL.h" // for CompositorOGL +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/LayerManagerComposite.h" +#include "mozilla/layers/LayersTypes.h" +#include "mozilla/layers/PLayerTransactionParent.h" +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ABORT_IF_FALSE, etc +#include "nsIWidget.h" // for nsIWidget +#include "nsRect.h" // for nsIntRect +#include "nsTArray.h" // for nsTArray +#include "nsThreadUtils.h" // for NS_IsMainThread +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop #ifdef XP_WIN #include "mozilla/layers/CompositorD3D11.h" #include "mozilla/layers/CompositorD3D9.h" #endif -#include "LayerTransactionParent.h" -#include "nsIWidget.h" -#include "nsGkAtoms.h" -#include "RenderTrace.h" -#include "gfxPlatform.h" -#include "mozilla/AutoRestore.h" -#include "mozilla/layers/AsyncCompositionManager.h" -#include "mozilla/layers/LayerManagerComposite.h" using namespace base; using namespace mozilla; diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index 8397ddb2bd7e..aa9571f8a93b 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -15,28 +15,37 @@ // which the deadline will be 15ms + throttle threshold //#define COMPOSITOR_PERFORMANCE_WARNING +#include // for uint64_t +#include "GeckoProfilerFunc.h" // for TimeStamp +#include "Layers.h" // for Layer +#include "ShadowLayersManager.h" // for ShadowLayersManager +#include "base/basictypes.h" // for DISALLOW_EVIL_CONSTRUCTORS +#include "base/platform_thread.h" // for PlatformThreadId +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/Monitor.h" // for Monitor +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/TimeStamp.h" // for TimeStamp +#include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/layers/GeckoContentController.h" +#include "mozilla/layers/LayerTransaction.h" // for TargetConfig #include "mozilla/layers/PCompositorParent.h" -#include "mozilla/layers/PLayerTransactionParent.h" -#include "mozilla/layers/APZCTreeManager.h" -#include "base/thread.h" -#include "mozilla/Monitor.h" -#include "mozilla/TimeStamp.h" -#include "ShadowLayersManager.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" +#include "nsSize.h" // for nsIntSize +class CancelableTask; +class MessageLoop; +class gfxContext; class nsIWidget; -namespace base { -class Thread; -} - namespace mozilla { namespace layers { class APZCTreeManager; -class Layer; -class LayerManagerComposite; class AsyncCompositionManager; -struct TextureFactoryIdentifier; +class LayerManagerComposite; +class LayerTransactionParent; struct ScopedLayerTreeRegistration { diff --git a/gfx/layers/ipc/GeckoContentController.h b/gfx/layers/ipc/GeckoContentController.h index 718a83c9bca6..dda543149a4c 100644 --- a/gfx/layers/ipc/GeckoContentController.h +++ b/gfx/layers/ipc/GeckoContentController.h @@ -7,7 +7,9 @@ #ifndef mozilla_layers_GeckoContentController_h #define mozilla_layers_GeckoContentController_h -#include "FrameMetrics.h" +#include "FrameMetrics.h" // for FrameMetrics, etc +#include "Units.h" // for CSSIntPoint, CSSRect, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 #include "nsISupportsImpl.h" class Task; @@ -15,7 +17,8 @@ class Task; namespace mozilla { namespace layers { -class GeckoContentController { +class GeckoContentController +{ public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GeckoContentController) diff --git a/gfx/layers/ipc/GestureEventListener.cpp b/gfx/layers/ipc/GestureEventListener.cpp index db11a111f563..bd8af8cf6bef 100644 --- a/gfx/layers/ipc/GestureEventListener.cpp +++ b/gfx/layers/ipc/GestureEventListener.cpp @@ -4,13 +4,16 @@ * 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 "base/basictypes.h" -#include "base/thread.h" - #include "GestureEventListener.h" -#include "AsyncPanZoomController.h" - -#include "mozilla/Preferences.h" +#include // for fabsf +#include // for size_t +#include "AsyncPanZoomController.h" // for AsyncPanZoomController +#include "base/task.h" // for CancelableTask, etc +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/mozalloc.h" // for operator new +#include "nsDebug.h" // for NS_WARN_IF_FALSE +#include "nsMathUtils.h" // for NS_hypot namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/GestureEventListener.h b/gfx/layers/ipc/GestureEventListener.h index 79b1a83ffd40..e573cea5c4d9 100644 --- a/gfx/layers/ipc/GestureEventListener.h +++ b/gfx/layers/ipc/GestureEventListener.h @@ -7,15 +7,22 @@ #ifndef mozilla_layers_GestureEventListener_h #define mozilla_layers_GestureEventListener_h -#include "mozilla/RefPtr.h" -#include "InputData.h" -#include "Axis.h" +#include // for uint64_t +#include "InputData.h" // for MultiTouchInput, etc +#include "Units.h" // for ScreenIntPoint +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsEvent.h" // for nsEventStatus +#include "nsISupportsImpl.h" +#include "nsTArray.h" // for nsTArray -#include "base/message_loop.h" +class CancelableTask; namespace mozilla { namespace layers { +class AsyncPanZoomController; + /** * Platform-non-specific, generalized gesture event listener. This class * intercepts all touches events on their way to AsyncPanZoomController and diff --git a/gfx/layers/ipc/ISurfaceAllocator.cpp b/gfx/layers/ipc/ISurfaceAllocator.cpp index bddf7adff46c..c1a4564866f3 100644 --- a/gfx/layers/ipc/ISurfaceAllocator.cpp +++ b/gfx/layers/ipc/ISurfaceAllocator.cpp @@ -6,15 +6,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ISurfaceAllocator.h" -#include "mozilla/ipc/SharedMemory.h" -#include "gfxSharedImageSurface.h" -#include "gfxPlatform.h" -#include "gfxASurface.h" -#include "mozilla/layers/LayersSurfaces.h" -#include "mozilla/layers/SharedPlanarYCbCrImage.h" -#include "mozilla/layers/SharedRGBImage.h" -#include "nsXULAppAPI.h" - +#include // for int32_t +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPlatform.h" // for gfxPlatform, gfxImageFormat +#include "gfxSharedImageSurface.h" // for gfxSharedImageSurface +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc +#include "ShadowLayerUtils.h" +#include "mozilla/mozalloc.h" // for operator delete[], etc +#include "nsAutoPtr.h" // for nsRefPtr, getter_AddRefs, etc +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #ifdef DEBUG #include "prenv.h" #endif diff --git a/gfx/layers/ipc/ISurfaceAllocator.h b/gfx/layers/ipc/ISurfaceAllocator.h index 14eb66a2c065..4391f02a0a08 100644 --- a/gfx/layers/ipc/ISurfaceAllocator.h +++ b/gfx/layers/ipc/ISurfaceAllocator.h @@ -6,10 +6,11 @@ #ifndef GFX_LAYERS_ISURFACEDEALLOCATOR #define GFX_LAYERS_ISURFACEDEALLOCATOR -#include "mozilla/ipc/SharedMemory.h" -#include "mozilla/RefPtr.h" -#include "gfxPoint.h" -#include "gfxASurface.h" +#include // for size_t +#include // for uint32_t +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc /* * FIXME [bjacob] *** PURE CRAZYNESS WARNING *** @@ -22,17 +23,18 @@ #define MOZ_HAVE_SURFACEDESCRIPTORGRALLOC #endif -class gfxSharedImageSurface; class gfxASurface; +class gfxSharedImageSurface; namespace base { class Thread; -} // namespace +} namespace mozilla { namespace ipc { class Shmem; -} // namespace +} + namespace layers { class PGrallocBufferChild; diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp index 31e514f039bd..86923ca8aee4 100644 --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -3,28 +3,52 @@ * 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 "base/thread.h" - -#include "CompositorParent.h" // for CompositorParent::CompositorLoop #include "ImageBridgeChild.h" -#include "ImageBridgeParent.h" -#include "gfxSharedImageSurface.h" -#include "mozilla/Monitor.h" -#include "mozilla/ReentrantMonitor.h" -#include "mozilla/layers/CompositableClient.h" -#include "nsXULAppAPI.h" -#include "mozilla/layers/TextureClient.h" -#include "mozilla/layers/ImageClient.h" -#include "ImageContainer.h" -#include "mozilla/layers/LayersTypes.h" -#include "ShadowLayers.h" +#include // for vector +#include "CompositorParent.h" // for CompositorParent +#include "ImageBridgeParent.h" // for ImageBridgeParent +#include "ImageContainer.h" // for ImageContainer +#include "Layers.h" // for Layer, etc +#include "ShadowLayers.h" // for ShadowLayerForwarder +#include "base/message_loop.h" // for MessageLoop +#include "base/platform_thread.h" // for PlatformThread +#include "base/process.h" // for ProcessHandle +#include "base/process_util.h" // for OpenProcessHandle +#include "base/task.h" // for NewRunnableFunction, etc +#include "base/thread.h" // for Thread +#include "base/tracked.h" // for FROM_HERE +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Monitor.h" // for Monitor, MonitorAutoLock +#include "mozilla/ReentrantMonitor.h" // for ReentrantMonitor, etc +#include "mozilla/ipc/AsyncChannel.h" // for AsyncChannel, etc +#include "mozilla/ipc/Transport.h" // for Transport +#include "mozilla/layers/CompositableClient.h" // for CompositableChild, etc +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator +#include "mozilla/layers/ImageClient.h" // for ImageClient +#include "mozilla/layers/LayerTransaction.h" // for CompositableOperation +#include "mozilla/layers/PCompositableChild.h" // for PCompositableChild +#include "mozilla/layers/TextureClient.h" // for TextureClient +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" // for ImageContainer::AddRef, etc +#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc +#include "nsTArrayForwardDeclare.h" // for AutoInfallibleTArray +#include "nsThreadUtils.h" // for NS_IsMainThread +#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop + +struct nsIntRect; using namespace base; using namespace mozilla::ipc; namespace mozilla { +namespace ipc { +class Shmem; +} + namespace layers { +class PGrallocBufferChild; typedef std::vector OpVector; struct CompositableTransaction @@ -738,7 +762,7 @@ static void ProxyAllocShmemNow(AllocShmemParams* aParams, bool ImageBridgeChild::DispatchAllocShmemInternal(size_t aSize, SharedMemory::SharedMemoryType aType, - Shmem* aShmem, + ipc::Shmem* aShmem, bool aUnsafe) { ReentrantMonitor barrier("AllocatorProxy alloc"); @@ -761,7 +785,7 @@ ImageBridgeChild::DispatchAllocShmemInternal(size_t aSize, } static void ProxyDeallocShmemNow(ISurfaceAllocator* aAllocator, - Shmem* aShmem, + ipc::Shmem* aShmem, ReentrantMonitor* aBarrier, bool* aDone) { diff --git a/gfx/layers/ipc/ImageBridgeChild.h b/gfx/layers/ipc/ImageBridgeChild.h index 3b8157a5fb9a..1e14649af3fb 100644 --- a/gfx/layers/ipc/ImageBridgeChild.h +++ b/gfx/layers/ipc/ImageBridgeChild.h @@ -6,27 +6,39 @@ #ifndef MOZILLA_GFX_IMAGEBRIDGECHILD_H #define MOZILLA_GFX_IMAGEBRIDGECHILD_H -#include "mozilla/layers/PImageBridgeChild.h" -#include "nsAutoPtr.h" +#include // for size_t +#include // for uint32_t, uint64_t +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for TemporaryRef +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc #include "mozilla/layers/CompositableForwarder.h" -#include "mozilla/layers/LayersTypes.h" - -class gfxSharedImageSurface; +#include "mozilla/layers/CompositorTypes.h" // for TextureIdentifier, etc +#include "mozilla/layers/LayersSurfaces.h" // for PGrallocBufferChild +#include "mozilla/layers/PImageBridgeChild.h" +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsRegion.h" // for nsIntRegion +class MessageLoop; +struct nsIntPoint; +struct nsIntRect; namespace base { class Thread; } namespace mozilla { +namespace ipc { +class Shmem; +} + namespace layers { +class BasicTiledLayerBuffer; class ImageClient; class ImageContainer; class ImageBridgeParent; -class SurfaceDescriptor; class CompositableClient; class CompositableTransaction; -class ShadowableLayer; class Image; class TextureClient; diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp index 359603811916..182b29ff3e94 100644 --- a/gfx/layers/ipc/ImageBridgeParent.cpp +++ b/gfx/layers/ipc/ImageBridgeParent.cpp @@ -3,14 +3,32 @@ * 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 "base/thread.h" - -#include "mozilla/layers/CompositorParent.h" -#include "mozilla/layers/ImageBridgeParent.h" -#include "CompositableHost.h" -#include "nsTArray.h" -#include "nsXULAppAPI.h" +#include "ImageBridgeParent.h" +#include // for uint64_t, uint32_t +#include "CompositableHost.h" // for CompositableParent, Create +#include "base/message_loop.h" // for MessageLoop +#include "base/process.h" // for ProcessHandle +#include "base/process_util.h" // for OpenProcessHandle +#include "base/task.h" // for CancelableTask, DeleteTask, etc +#include "base/tracked.h" // for FROM_HERE +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/ipc/AsyncChannel.h" // for AsyncChannel, etc +#include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/ipc/Transport.h" // for Transport +#include "mozilla/layers/CompositableTransactionParent.h" +#include "mozilla/layers/CompositorParent.h" // for CompositorParent #include "mozilla/layers/LayerManagerComposite.h" +#include "mozilla/layers/LayerTransaction.h" // for EditReply +#include "mozilla/layers/LayersSurfaces.h" // for PGrallocBufferParent +#include "mozilla/layers/PCompositableParent.h" +#include "mozilla/layers/PImageBridgeParent.h" +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_RUNTIMEABORT, etc +#include "nsISupportsImpl.h" // for ImageBridgeParent::Release, etc +#include "nsTArray.h" // for nsTArray, nsTArray_Impl +#include "nsTArrayForwardDeclare.h" // for InfallibleTArray +#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop using namespace base; using namespace mozilla::ipc; @@ -18,6 +36,7 @@ using namespace mozilla::ipc; namespace mozilla { namespace layers { +class PGrallocBufferParent; ImageBridgeParent::ImageBridgeParent(MessageLoop* aLoop, Transport* aTransport) : mMessageLoop(aLoop) diff --git a/gfx/layers/ipc/ImageBridgeParent.h b/gfx/layers/ipc/ImageBridgeParent.h index 70681a85b110..1e2bcd2e9803 100644 --- a/gfx/layers/ipc/ImageBridgeParent.h +++ b/gfx/layers/ipc/ImageBridgeParent.h @@ -3,15 +3,28 @@ * 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/PImageBridgeParent.h" +#include // for size_t +#include // for uint32_t, uint64_t #include "CompositableTransactionParent.h" +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc +#include "mozilla/layers/PImageBridgeParent.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" +#include "nsTArrayForwardDeclare.h" // for InfallibleTArray class MessageLoop; namespace mozilla { +namespace ipc { +class Shmem; +} + namespace layers { -class CompositorParent; /** * ImageBridgeParent is the manager Protocol of ImageContainerParent. * It's purpose is mainly to setup the IPDL connection. Most of the diff --git a/gfx/layers/ipc/LayerTransactionChild.cpp b/gfx/layers/ipc/LayerTransactionChild.cpp index 2b4b505a783d..7c3119800870 100644 --- a/gfx/layers/ipc/LayerTransactionChild.cpp +++ b/gfx/layers/ipc/LayerTransactionChild.cpp @@ -5,14 +5,20 @@ * 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 "ShadowLayerChild.h" #include "LayerTransactionChild.h" -#include "ShadowLayerUtils.h" -#include "mozilla/layers/CompositableClient.h" +#include "mozilla/layers/CompositableClient.h" // for CompositableChild +#include "mozilla/layers/LayersSurfaces.h" // for PGrallocBufferChild +#include "mozilla/layers/PCompositableChild.h" // for PCompositableChild +#include "mozilla/layers/PLayerChild.h" // for PLayerChild +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsDebug.h" // for NS_RUNTIMEABORT, etc +#include "nsTArray.h" // for nsTArray namespace mozilla { namespace layers { +class PGrallocBufferChild; + void LayerTransactionChild::Destroy() { diff --git a/gfx/layers/ipc/LayerTransactionChild.h b/gfx/layers/ipc/LayerTransactionChild.h index af16150014fa..c99667d7df5f 100644 --- a/gfx/layers/ipc/LayerTransactionChild.h +++ b/gfx/layers/ipc/LayerTransactionChild.h @@ -8,6 +8,10 @@ #ifndef MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H #define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H +#include // for uint32_t +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/layers/PLayerTransactionChild.h" namespace mozilla { diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index 712ee7950111..edbf8de809ff 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -5,28 +5,39 @@ * 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 - -#include "AutoOpenSurface.h" -#include "CompositorParent.h" -#include "gfxSharedImageSurface.h" -#include "ImageLayers.h" -#include "mozilla/layout/RenderFrameParent.h" -#include "mozilla/unused.h" -#include "RenderTrace.h" -#include "ShadowLayerParent.h" #include "LayerTransactionParent.h" -#include "ShadowLayers.h" -#include "ShadowLayerUtils.h" -#include "TiledLayerBuffer.h" -#include "gfxPlatform.h" -#include "CompositableHost.h" -#include "mozilla/layers/ThebesLayerComposite.h" -#include "mozilla/layers/ImageLayerComposite.h" -#include "mozilla/layers/ColorLayerComposite.h" -#include "mozilla/layers/ContainerLayerComposite.h" +#include // for vector +#include "CompositableHost.h" // for CompositableParent, Get, etc +#include "ImageLayers.h" // for ImageLayer +#include "Layers.h" // for Layer, ContainerLayer, etc +#include "ShadowLayerParent.h" // for ShadowLayerParent +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxPoint3D.h" // for gfxPoint3D +#include "CompositableTransactionParent.h" // for EditReplyVector +#include "ShadowLayersManager.h" // for ShadowLayersManager +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/BasePoint3D.h" // for BasePoint3D #include "mozilla/layers/CanvasLayerComposite.h" -#include "mozilla/layers/PLayerTransaction.h" +#include "mozilla/layers/ColorLayerComposite.h" +#include "mozilla/layers/Compositor.h" // for Compositor +#include "mozilla/layers/ContainerLayerComposite.h" +#include "mozilla/layers/ImageLayerComposite.h" +#include "mozilla/layers/LayerManagerComposite.h" +#include "mozilla/layers/LayerTransaction.h" // for EditReply, etc +#include "mozilla/layers/LayersSurfaces.h" // for PGrallocBufferParent +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_LOG +#include "mozilla/layers/PCompositableParent.h" +#include "mozilla/layers/PLayerParent.h" // for PLayerParent +#include "mozilla/layers/ThebesLayerComposite.h" +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsCoord.h" // for NSAppUnitsToFloatPixels +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsISupportsImpl.h" // for Layer::Release, etc +#include "nsLayoutUtils.h" // for nsLayoutUtils +#include "nsMathUtils.h" // for NS_round +#include "nsPoint.h" // for nsPoint +#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc typedef std::vector EditReplyVector; @@ -35,6 +46,8 @@ using mozilla::layout::RenderFrameParent; namespace mozilla { namespace layers { +class PGrallocBufferParent; + //-------------------------------------------------- // Convenience accessors static ShadowLayerParent* diff --git a/gfx/layers/ipc/LayerTransactionParent.h b/gfx/layers/ipc/LayerTransactionParent.h index 4ab749d267f6..ec5859e73a2a 100644 --- a/gfx/layers/ipc/LayerTransactionParent.h +++ b/gfx/layers/ipc/LayerTransactionParent.h @@ -8,13 +8,24 @@ #ifndef MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H #define MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H -#include "mozilla/layers/PLayerTransactionParent.h" -#include "ShadowLayers.h" -#include "ShadowLayersManager.h" +#include // for size_t +#include // for uint64_t, uint32_t #include "CompositableTransactionParent.h" +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc +#include "mozilla/layers/PLayerTransactionParent.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsTArrayForwardDeclare.h" // for InfallibleTArray + +class gfx3DMatrix; namespace mozilla { +namespace ipc { +class Shmem; +} + namespace layout { class RenderFrameParent; } @@ -25,6 +36,7 @@ class Layer; class LayerManagerComposite; class ShadowLayerParent; class CompositableParent; +class ShadowLayersManager; class LayerTransactionParent : public PLayerTransactionParent, public CompositableParentManager diff --git a/gfx/layers/ipc/ShadowLayerChild.cpp b/gfx/layers/ipc/ShadowLayerChild.cpp index 6322bd03359b..490ad523032e 100644 --- a/gfx/layers/ipc/ShadowLayerChild.cpp +++ b/gfx/layers/ipc/ShadowLayerChild.cpp @@ -6,8 +6,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ShadowLayerChild.h" -#include "Layers.h" -#include "ShadowLayers.h" +#include "Layers.h" // for Layer +#include "ShadowLayers.h" // for ShadowableLayer +#include "nsDebug.h" // for NS_ABORT_IF_FALSE namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/ShadowLayerChild.h b/gfx/layers/ipc/ShadowLayerChild.h index f38d24fbece9..71b36931ed57 100644 --- a/gfx/layers/ipc/ShadowLayerChild.h +++ b/gfx/layers/ipc/ShadowLayerChild.h @@ -8,7 +8,9 @@ #ifndef mozilla_layers_ShadowLayerChild_h #define mozilla_layers_ShadowLayerChild_h -#include "mozilla/layers/PLayerChild.h" +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/layers/PLayerChild.h" // for PLayerChild namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/ShadowLayerParent.cpp b/gfx/layers/ipc/ShadowLayerParent.cpp index b7431ea513ec..80e1548e3918 100644 --- a/gfx/layers/ipc/ShadowLayerParent.cpp +++ b/gfx/layers/ipc/ShadowLayerParent.cpp @@ -5,11 +5,10 @@ * 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 "LayerTransactionParent.h" #include "ShadowLayerParent.h" -#include "ShadowLayers.h" - -#include "BasicLayers.h" +#include "Layers.h" // for Layer, ContainerLayer +#include "nsDebug.h" // for NS_RUNTIMEABORT +#include "nsISupportsImpl.h" // for Layer::AddRef, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/ShadowLayerParent.h b/gfx/layers/ipc/ShadowLayerParent.h index b13d252cbf0f..817cf67f5e5b 100644 --- a/gfx/layers/ipc/ShadowLayerParent.h +++ b/gfx/layers/ipc/ShadowLayerParent.h @@ -8,7 +8,10 @@ #ifndef mozilla_layers_ShadowLayerParent_h #define mozilla_layers_ShadowLayerParent_h -#include "mozilla/layers/PLayerParent.h" +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/layers/PLayerParent.h" // for PLayerParent +#include "nsAutoPtr.h" // for nsRefPtr namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp index 031b155cec59..e822a8bf6d2a 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp @@ -5,21 +5,40 @@ * 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/PLayerTransaction.h" -#include "mozilla/layers/LayerManagerComposite.h" -#include "mozilla/layers/CompositorTypes.h" -#include "mozilla/layers/ISurfaceAllocator.h" -#include "mozilla/layers/ShadowLayers.h" - -#include "gfxPlatform.h" - -#include "gfxXlibSurface.h" -#include "mozilla/X11Util.h" +#include "ShadowLayerUtilsX11.h" +#include // for Drawable, XID +#include // for Display, Visual, etc +#include // for XRenderPictFormat, etc +#include // for PictFormat #include "cairo-xlib.h" +#include // for uint32_t +#include "GLDefs.h" // for GLenum +#include "cairo-rename.h" +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxPoint.h" // for gfxIntSize +#include "gfxXlibSurface.h" // for gfxXlibSurface +#include "mozilla/X11Util.h" // for DefaultXDisplay, FinishX, etc +#include "mozilla/layers/CompositableForwarder.h" +#include "mozilla/layers/CompositorTypes.h" // for OpenMode +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator, etc +#include "mozilla/layers/LayerManagerComposite.h" +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc +#include "mozilla/layers/ShadowLayers.h" // for ShadowLayerForwarder, etc +#include "mozilla/mozalloc.h" // for operator new +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ERROR +#include "prenv.h" // for PR_GetEnv using namespace mozilla::gl; namespace mozilla { +namespace gl { +class GLContext; +class TextureImage; +} + namespace layers { // Return true if we're likely compositing using X and so should use diff --git a/gfx/layers/ipc/ShadowLayerUtilsX11.h b/gfx/layers/ipc/ShadowLayerUtilsX11.h index 9773967cb983..726b61bfa509 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsX11.h +++ b/gfx/layers/ipc/ShadowLayerUtilsX11.h @@ -8,16 +8,24 @@ #ifndef mozilla_layers_ShadowLayerUtilsX11_h #define mozilla_layers_ShadowLayerUtilsX11_h -#include -#include - +#include // for Drawable #include "ipc/IPCMessageUtils.h" +#include "gfxPoint.h" // for gfxIntSize +#include "nsCOMPtr.h" // for already_AddRefed + +//#include +//#include + #define MOZ_HAVE_SURFACEDESCRIPTORX11 #define MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS class gfxXlibSurface; +namespace IPC { +class Message; +} + namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index 6435f31b3a2e..fbaf86f01527 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -5,39 +5,50 @@ * 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 -#include - -#include "gfxSharedImageSurface.h" -#include "gfxPlatform.h" - -#include "AutoOpenSurface.h" -#include "mozilla/ipc/SharedMemorySysV.h" -#include "mozilla/layers/PLayerChild.h" -#include "mozilla/layers/PLayerTransactionChild.h" -#include "mozilla/layers/PLayerTransactionParent.h" -#include "mozilla/layers/LayerTransaction.h" -#include "mozilla/layers/LayersSurfaces.h" #include "ShadowLayers.h" -#include "ShadowLayerChild.h" -#include "gfxipc/ShadowLayerUtils.h" -#include "RenderTrace.h" -#include "GeckoProfiler.h" -#include "nsXULAppAPI.h" -#include "mozilla/layers/ImageClient.h" -#include "mozilla/layers/CanvasClient.h" -#include "mozilla/layers/ContentClient.h" -#include "ISurfaceAllocator.h" +#include // for _Rb_tree_const_iterator, etc +#include // for vector +#include "AutoOpenSurface.h" // for AutoOpenSurface, etc +#include "GeckoProfilerImpl.h" // for PROFILER_LABEL +#include "ISurfaceAllocator.h" // for IsSurfaceDescriptorValid +#include "Layers.h" // for Layer +#include "RenderTrace.h" // for RenderTraceScope +#include "ShadowLayerChild.h" // for ShadowLayerChild +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPlatform.h" // for gfxImageFormat, gfxPlatform +#include "gfxSharedImageSurface.h" // for gfxSharedImageSurface +#include "ipc/IPCMessageUtils.h" // for gfxContentType, null_t +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/layers/CompositableClient.h" // for CompositableClient, etc +#include "mozilla/layers/LayerTransaction.h" // for Edit, etc +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_LOG +#include "mozilla/layers/PLayerTransactionChild.h" +#include "ShadowLayerUtils.h" +#include "mozilla/layers/TextureClient.h" // for TextureClient +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsAutoPtr.h" // for nsRefPtr, getter_AddRefs, etc +#include "nsDebug.h" // for NS_ABORT_IF_FALSE, etc +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc +#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc -#include "nsTraceRefcntImpl.h" +struct nsIntPoint; using namespace mozilla::ipc; using namespace mozilla::gl; using namespace mozilla::dom; namespace mozilla { +namespace ipc { +class Shmem; +} + namespace layers { +class BasicTiledLayerBuffer; + typedef nsTArray BufferArray; typedef std::vector EditVector; typedef std::set ShadowableLayerSet; diff --git a/gfx/layers/ipc/ShadowLayers.h b/gfx/layers/ipc/ShadowLayers.h index 5d8dcf6251a8..249d444431b5 100644 --- a/gfx/layers/ipc/ShadowLayers.h +++ b/gfx/layers/ipc/ShadowLayers.h @@ -8,58 +8,54 @@ #ifndef mozilla_layers_ShadowLayers_h #define mozilla_layers_ShadowLayers_h 1 -#include "gfxASurface.h" -#include "GLDefs.h" - -#include "ImageLayers.h" -#include "mozilla/layers/Compositor.h" -#include "mozilla/ipc/SharedMemory.h" -#include "mozilla/WidgetUtils.h" -#include "mozilla/layers/ISurfaceAllocator.h" -#include "mozilla/dom/ScreenOrientation.h" +#include // for size_t +#include // for uint64_t +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/WidgetUtils.h" // for ScreenRotation +#include "mozilla/dom/ScreenOrientation.h" // for ScreenOrientation +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc #include "mozilla/layers/CompositableForwarder.h" -#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/CompositorTypes.h" // for OpenMode, etc +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsRegion.h" // for nsIntRegion +#include "nsTArrayForwardDeclare.h" // for InfallibleTArray -class gfxSharedImageSurface; +struct nsIntPoint; +struct nsIntRect; namespace mozilla { - -namespace gl { -class GLContext; -class TextureImage; -} - namespace layers { -class CompositableClient; -class Edit; +class BasicTiledLayerBuffer; +class CanvasClient; +class CanvasLayerComposite; +class CanvasSurface; +class ColorLayerComposite; +class CompositableChild; +class ContainerLayerComposite; +class ContentClient; +class ContentClientRemote; class EditReply; +class ImageClient; +class ImageLayerComposite; +class Layer; class OptionalThebesBuffer; class PLayerChild; class PLayerTransactionChild; class PLayerTransactionParent; -class ShadowableLayer; -class ThebesLayerComposite; -class ContainerLayerComposite; -class ImageLayerComposite; -class ColorLayerComposite; -class CanvasLayerComposite; class RefLayerComposite; +class ShadowableLayer; +class Shmem; +class ShmemTextureClient; class SurfaceDescriptor; +class TextureClient; +class ThebesLayerComposite; class ThebesBuffer; +class ThebesBufferData; class TiledLayerComposer; class Transaction; -class SurfaceDescriptor; -class CanvasSurface; -class DeprecatedTextureClientShmem; -class ShmemTextureClient; -class ContentClientRemote; -class CompositableChild; -class ImageClient; -class CanvasClient; -class ContentClient; -class TextureClient; - /** * We want to share layer trees across thread contexts and address diff --git a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp index 7caf05929daf..9a50b877f6c3 100644 --- a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp +++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp @@ -4,11 +4,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "SharedPlanarYCbCrImage.h" +#include // for size_t +#include // for printf +#include "ISurfaceAllocator.h" // for ISurfaceAllocator, etc +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/Types.h" // for SurfaceFormat::FORMAT_YUV +#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc +#include "mozilla/layers/ImageClient.h" // for ImageClient +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc +#include "mozilla/layers/TextureClient.h" // for BufferTextureClient, etc #include "mozilla/layers/YCbCrImageDataSerializer.h" -#include "ISurfaceAllocator.h" -#include "mozilla/layers/LayersSurfaces.h" -#include "mozilla/layers/TextureClient.h" -#include "mozilla/layers/ImageClient.h" +#include "mozilla/mozalloc.h" // for operator delete +#include "nsISupportsImpl.h" // for Image::AddRef + +class gfxASurface; namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/SharedPlanarYCbCrImage.h b/gfx/layers/ipc/SharedPlanarYCbCrImage.h index 0cea88bb6b4f..23d89f78b231 100644 --- a/gfx/layers/ipc/SharedPlanarYCbCrImage.h +++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.h @@ -3,10 +3,16 @@ * 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 "ImageContainer.h" -#include "mozilla/ipc/Shmem.h" -#include "mozilla/ipc/SharedMemory.h" -#include "mozilla/layers/ISurfaceAllocator.h" +#include // for uint8_t, uint32_t +#include "ImageContainer.h" // for PlanarYCbCrImage, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/ipc/Shmem.h" // for Shmem +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_WARNING +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR + +class gfxASurface; #ifndef MOZILLA_LAYERS_DeprecatedSharedPlanarYCbCrImage_H #define MOZILLA_LAYERS_DeprecatedSharedPlanarYCbCrImage_H @@ -14,9 +20,11 @@ namespace mozilla { namespace layers { -class ImageClient; -class TextureClient; class BufferTextureClient; +class ImageClient; +class ISurfaceAllocator; +class SurfaceDescriptor; +class TextureClient; // XXX - This class will be removed along with DeprecatedImageClient class DeprecatedSharedPlanarYCbCrImage : public PlanarYCbCrImage diff --git a/gfx/layers/ipc/SharedRGBImage.cpp b/gfx/layers/ipc/SharedRGBImage.cpp index 41b67cefd068..76260e4662ba 100644 --- a/gfx/layers/ipc/SharedRGBImage.cpp +++ b/gfx/layers/ipc/SharedRGBImage.cpp @@ -2,14 +2,22 @@ * 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 "ShadowLayers.h" #include "SharedRGBImage.h" -#include "mozilla/layers/LayersSurfaces.h" -#include "Shmem.h" -#include "mozilla/layers/ISurfaceAllocator.h" -#include "mozilla/layers/TextureClient.h" -#include "mozilla/layers/ImageClient.h" -#include "gfx2DGlue.h" +#include "ImageTypes.h" // for ImageFormat::SHARED_RGB, etc +#include "Shmem.h" // for Shmem +#include "gfx2DGlue.h" // for ImageFormatToSurfaceFormat, etc +#include "gfxPlatform.h" // for gfxPlatform, gfxImageFormat +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator, etc +#include "mozilla/layers/ImageClient.h" // for ImageClient +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc +#include "mozilla/layers/TextureClient.h" // for BufferTextureClient, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_WARNING, NS_ASSERTION +#include "nsISupportsImpl.h" // for Image::AddRef, etc +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc // Just big enough for a 1080p RGBA32 frame #define MAX_FRAME_SIZE (16 * 1024 * 1024) diff --git a/gfx/layers/ipc/SharedRGBImage.h b/gfx/layers/ipc/SharedRGBImage.h index 49e8640caf84..4b982d7b3821 100644 --- a/gfx/layers/ipc/SharedRGBImage.h +++ b/gfx/layers/ipc/SharedRGBImage.h @@ -5,17 +5,29 @@ #ifndef SHAREDRGBIMAGE_H_ #define SHAREDRGBIMAGE_H_ -#include "ImageContainer.h" -#include "ISurfaceAllocator.h" +#include // for size_t +#include // for uint8_t +#include "ImageContainer.h" // for ISharedImage, Image, etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "nsCOMPtr.h" // for already_AddRefed namespace mozilla { namespace ipc { class Shmem; } + namespace layers { + class BufferTextureClient; -class TextureClient; class ImageClient; +class ISurfaceAllocator; +class TextureClient; +class SurfaceDescriptor; already_AddRefed CreateSharedRGBImage(ImageContainer* aImageContainer, nsIntSize aSize, diff --git a/gfx/layers/ipc/TaskThrottler.cpp b/gfx/layers/ipc/TaskThrottler.cpp index 9c257da36ed9..abf48d4b9ff6 100644 --- a/gfx/layers/ipc/TaskThrottler.cpp +++ b/gfx/layers/ipc/TaskThrottler.cpp @@ -4,8 +4,6 @@ * 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 "base/basictypes.h" -#include "base/message_loop.h" #include "TaskThrottler.h" namespace mozilla { diff --git a/gfx/layers/ipc/TaskThrottler.h b/gfx/layers/ipc/TaskThrottler.h index 7f0ccb66b63d..fd0602409623 100644 --- a/gfx/layers/ipc/TaskThrottler.h +++ b/gfx/layers/ipc/TaskThrottler.h @@ -7,13 +7,15 @@ #ifndef mozilla_dom_TaskThrottler_h #define mozilla_dom_TaskThrottler_h -#include "nsAutoPtr.h" -#include "nsTArray.h" -#include "mozilla/TimeStamp.h" +#include // for uint32_t +#include "base/task.h" // for CancelableTask +#include "mozilla/TimeStamp.h" // for TimeDuration, TimeStamp +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsAutoPtr +#include "nsTArray.h" // for nsTArray -class CancelableTask; namespace tracked_objects { - class Location; +class Location; } namespace mozilla { diff --git a/gfx/layers/opengl/CanvasLayerOGL.cpp b/gfx/layers/opengl/CanvasLayerOGL.cpp index 5b104874011d..488a597239a3 100644 --- a/gfx/layers/opengl/CanvasLayerOGL.cpp +++ b/gfx/layers/opengl/CanvasLayerOGL.cpp @@ -3,22 +3,23 @@ * 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 "ipc/AutoOpenSurface.h" -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/ShadowLayers.h" - -#include "gfxSharedImageSurface.h" - #include "CanvasLayerOGL.h" - -#include "gfxImageSurface.h" -#include "gfxContext.h" -#include "GLContextProvider.h" -#include "gfxPlatform.h" -#include "SharedSurfaceGL.h" -#include "SharedSurfaceEGL.h" -#include "SurfaceStream.h" -#include "gfxColor.h" +#include "GLScreenBuffer.h" // for GLScreenBuffer +#include "SharedSurface.h" // for SharedSurface +#include "SharedSurfaceGL.h" // for SharedSurface_Basic, etc +#include "SurfaceStream.h" // for SurfaceStream, etc +#include "SurfaceTypes.h" // for SharedSurfaceType, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPlatform.h" // for gfxPlatform +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/gfx/Types.h" // for SurfaceFormat, etc +#include "nsDebug.h" // for NS_ABORT_IF_FALSE, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsSize.h" // for nsIntSize +#include "LayerManagerOGL.h" // for LayerOGL::GLContext, etc #ifdef XP_MACOSX #include "mozilla/gfx/MacIOSurface.h" @@ -35,6 +36,7 @@ #endif #ifdef GL_PROVIDER_GLX +#include "GLXLibrary.h" // for GLXLibrary, sDefGLXLib #include "gfxXlibSurface.h" #endif diff --git a/gfx/layers/opengl/CanvasLayerOGL.h b/gfx/layers/opengl/CanvasLayerOGL.h index 2dcfd0e0355b..b40d4480b3a9 100644 --- a/gfx/layers/opengl/CanvasLayerOGL.h +++ b/gfx/layers/opengl/CanvasLayerOGL.h @@ -6,16 +6,28 @@ #ifndef GFX_CANVASLAYEROGL_H #define GFX_CANVASLAYEROGL_H -#include "LayerManagerOGL.h" -#include "gfxASurface.h" -#include "GLDefs.h" -#include "mozilla/Preferences.h" - +#include "GLContext.h" // for GLContext +#include "GLContextTypes.h" // for GLuint, GLenum +#include "GLDefs.h" // for LOCAL_GL_TEXTURE_2D +#include "LayerManagerOGL.h" // for LayerOGL::GLContext, etc +#include "Layers.h" // for CanvasLayer, etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "opengl/LayerManagerOGLProgram.h" // for ShaderProgramType, etc +#include "./../mozilla-config.h" // for GL_PROVIDER_GLX #if defined(GL_PROVIDER_GLX) #include "GLXLibrary.h" #include "mozilla/X11Util.h" #endif +struct nsIntPoint; + namespace mozilla { namespace layers { diff --git a/gfx/layers/opengl/ColorLayerOGL.cpp b/gfx/layers/opengl/ColorLayerOGL.cpp index 5f759f202082..84ff69bcb49f 100644 --- a/gfx/layers/opengl/ColorLayerOGL.cpp +++ b/gfx/layers/opengl/ColorLayerOGL.cpp @@ -4,6 +4,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ColorLayerOGL.h" +#include "gfxColor.h" // for gfxRGBA +#include "LayerManagerOGL.h" // for LayerManagerOGL +#include "LayerManagerOGLProgram.h" // for ShaderProgramOGL, etc + +struct nsIntPoint; namespace mozilla { namespace layers { diff --git a/gfx/layers/opengl/ColorLayerOGL.h b/gfx/layers/opengl/ColorLayerOGL.h index 01c98dabb2b0..d1ddd4839f2f 100644 --- a/gfx/layers/opengl/ColorLayerOGL.h +++ b/gfx/layers/opengl/ColorLayerOGL.h @@ -6,10 +6,10 @@ #ifndef GFX_COLORLAYEROGL_H #define GFX_COLORLAYEROGL_H -#include "mozilla/layers/PLayerTransaction.h" -#include "mozilla/layers/ShadowLayers.h" +#include "LayerManagerOGL.h" // for LayerOGL, LayerManagerOGL +#include "Layers.h" // for ColorLayer, etc -#include "LayerManagerOGL.h" +struct nsIntPoint; namespace mozilla { namespace layers { diff --git a/gfx/layers/opengl/CompositingRenderTargetOGL.h b/gfx/layers/opengl/CompositingRenderTargetOGL.h index 77a3ffda4302..79abf708db5e 100644 --- a/gfx/layers/opengl/CompositingRenderTargetOGL.h +++ b/gfx/layers/opengl/CompositingRenderTargetOGL.h @@ -6,21 +6,36 @@ #ifndef MOZILLA_GFX_COMPOSITINGRENDERTARGETOGL_H #define MOZILLA_GFX_COMPOSITINGRENDERTARGETOGL_H -#include "mozilla/layers/CompositorOGL.h" -#include "mozilla/gfx/Rect.h" -#include "gfxASurface.h" +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "GLContext.h" // for GLContext +#include "GLContextTypes.h" // for GLenum, GLuint +#include "GLDefs.h" // for LOCAL_GL_FRAMEBUFFER, etc +#include "gfxMatrix.h" // for gfxMatrix +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef +#include "mozilla/gfx/Point.h" // for IntSize, IntSizeTyped +#include "mozilla/gfx/Types.h" // for SurfaceFormat, etc +#include "mozilla/layers/Compositor.h" // for SurfaceInitMode, etc +#include "mozilla/layers/TextureHost.h" // for CompositingRenderTarget +#include "mozilla/layers/CompositorOGL.h" // for CompositorOGL +#include "mozilla/mozalloc.h" // for operator new +#include "nsAString.h" +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ERROR, NS_WARNING +#include "nsString.h" // for nsAutoCString -#ifdef MOZ_DUMP_PAINTING -#include "mozilla/layers/CompositorOGL.h" -#endif +class gfxImageSurface; namespace mozilla { namespace gl { - class TextureImage; class BindableTexture; } + namespace layers { +class TextureSource; + class CompositingRenderTargetOGL : public CompositingRenderTarget { typedef mozilla::gl::GLContext GLContext; diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index cec4d9966bae..a9b9e096e2b9 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -3,31 +3,41 @@ * 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/TextureHostOGL.h" #include "CompositorOGL.h" -#include "mozilla/layers/ImageHost.h" -#include "mozilla/layers/ContentHost.h" +#include // for size_t +#include // for uint32_t, uint8_t +#include // for free, malloc +#include "FPSCounter.h" // for FPSState, FPSCounter +#include "GLContextProvider.h" // for GLContextProvider +#include "Layers.h" // for WriteSnapshotToDumpFile +#include "gfx2DGlue.h" // for ThebesFilter +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxCrashReporterUtils.h" // for ScopedGfxFeatureReporter +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPattern.h" // for gfxPattern, etc +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxRect.h" // for gfxRect +#include "gfxUtils.h" // for NextPowerOfTwo, gfxUtils, etc +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/Matrix.h" // for Matrix4x4, Matrix #include "mozilla/layers/CompositingRenderTargetOGL.h" -#include "mozilla/Preferences.h" -#include "mozilla/layers/ShadowLayers.h" -#include "mozilla/layers/PLayer.h" -#include "mozilla/layers/Effects.h" -#include "nsIWidget.h" -#include "FPSCounter.h" - -#include "gfxUtils.h" - -#include "GLContextProvider.h" - -#include "nsIServiceManager.h" -#include "nsIConsoleService.h" - -#include "gfxCrashReporterUtils.h" - -#include "nsMathUtils.h" - -#include "GeckoProfiler.h" -#include +#include "mozilla/layers/Effects.h" // for EffectChain, TexturedEffect, etc +#include "mozilla/layers/TextureHost.h" // for TextureSource, etc +#include "mozilla/layers/TextureHostOGL.h" // for TextureSourceOGL, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAString.h" +#include "nsIConsoleService.h" // for nsIConsoleService, etc +#include "nsIWidget.h" // for nsIWidget +#include "nsLiteralString.h" // for NS_LITERAL_STRING +#include "nsMathUtils.h" // for NS_roundf +#include "nsRect.h" // for nsIntRect +#include "nsServiceManagerUtils.h" // for do_GetService +#include "nsString.h" // for nsString, nsAutoCString, etc +#include "prtypes.h" // for PR_INT32_MAX #if MOZ_ANDROID_OMTC #include "TexturePoolOGL.h" diff --git a/gfx/layers/opengl/CompositorOGL.h b/gfx/layers/opengl/CompositorOGL.h index 0fab795a8466..a92317051566 100644 --- a/gfx/layers/opengl/CompositorOGL.h +++ b/gfx/layers/opengl/CompositorOGL.h @@ -6,20 +6,55 @@ #ifndef MOZILLA_GFX_COMPOSITOROGL_H #define MOZILLA_GFX_COMPOSITOROGL_H -#include "mozilla/layers/Compositor.h" -#include "GLContext.h" -#include "LayerManagerOGLProgram.h" -#include "mozilla/layers/Effects.h" -#include "nsTArray.h" - -#include "mozilla/TimeStamp.h" +#include "./../mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "GLContext.h" // for GLContext +#include "GLContextTypes.h" // for GLuint, GLenum, GLint +#include "GLDefs.h" // for GLintptr, GLvoid, etc +#include "GeckoProfilerFunc.h" // for TimeStamp +#include "LayerManagerOGLProgram.h" // for ShaderProgramOGL, etc +#include "Units.h" // for ScreenPoint +#include "gfxContext.h" // for gfxContext +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE, MOZ_FINAL +#include "mozilla/RefPtr.h" // for TemporaryRef, RefPtr +#include "mozilla/TimeStamp.h" // for TimeStamp +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Point.h" // for IntSize, Point +#include "mozilla/gfx/Rect.h" // for Rect, IntRect +#include "mozilla/gfx/Types.h" // for Float, SurfaceFormat, etc +#include "mozilla/layers/Compositor.h" // for SurfaceInitMode, Compositor, etc +#include "mozilla/layers/CompositorTypes.h" // for MaskType::NumMaskTypes, etc +#include "mozilla/layers/LayersTypes.h" +#include "nsAutoPtr.h" // for nsRefPtr, nsAutoPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING +#include "nsISupportsImpl.h" // for gfxContext::AddRef, etc +#include "nsSize.h" // for nsIntSize +#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc +#include "nsThreadUtils.h" // for nsRunnable +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +#include "nsXULAppAPI.h" // for XRE_GetProcessType +#include "nscore.h" // for NS_IMETHOD +class gfx3DMatrix; +class nsIWidget; +struct gfxMatrix; namespace mozilla { +namespace gfx { +class Matrix4x4; +} + namespace layers { -struct FPSState; +class CompositingRenderTarget; class CompositingRenderTargetOGL; +class DataTextureSource; class GLManagerCompositor; +class TextureSource; +struct Effect; +struct EffectChain; +struct FPSState; class CompositorOGL : public Compositor { diff --git a/gfx/layers/opengl/ContainerLayerOGL.cpp b/gfx/layers/opengl/ContainerLayerOGL.cpp index 691f0d141500..0e0cbcf407a7 100644 --- a/gfx/layers/opengl/ContainerLayerOGL.cpp +++ b/gfx/layers/opengl/ContainerLayerOGL.cpp @@ -4,9 +4,26 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ContainerLayerOGL.h" -#include "gfxUtils.h" -#include "gfxPlatform.h" +#include // for uint32_t +#include // for min +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING #include "GLContext.h" +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxUtils.h" // for gfxUtils, etc +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/layers/CompositorTypes.h" // for MaskType, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsDebug.h" // for NS_ASSERTION +#include "nsISupportsUtils.h" // for NS_ADDREF, NS_RELEASE +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsTArray.h" // for nsAutoTArray +#include "LayerManagerOGL.h" // for LayerManagerOGL, LayerOGL, etc +#include "LayerManagerOGLProgram.h" // for ShaderProgramOGL +class gfxImageSurface; namespace mozilla { namespace layers { diff --git a/gfx/layers/opengl/ContainerLayerOGL.h b/gfx/layers/opengl/ContainerLayerOGL.h index cf82c29b9ab1..84d1bbf32aaf 100644 --- a/gfx/layers/opengl/ContainerLayerOGL.h +++ b/gfx/layers/opengl/ContainerLayerOGL.h @@ -6,8 +6,10 @@ #ifndef GFX_CONTAINERLAYEROGL_H #define GFX_CONTAINERLAYEROGL_H -#include "Layers.h" -#include "LayerManagerOGL.h" +#include "LayerManagerOGL.h" // for LayerOGL +#include "Layers.h" // for Layer (ptr only), etc +class gfx3DMatrix; +struct nsIntPoint; namespace mozilla { namespace layers { diff --git a/gfx/layers/opengl/FPSCounter.h b/gfx/layers/opengl/FPSCounter.h index dfe4a1f98957..34f4ef54409c 100644 --- a/gfx/layers/opengl/FPSCounter.h +++ b/gfx/layers/opengl/FPSCounter.h @@ -3,8 +3,11 @@ * 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/TimeStamp.h" -#include "LayerManagerOGLProgram.h" +#include // for size_t +#include // for min +#include "GLDefs.h" // for GLuint +#include "mozilla/TimeStamp.h" // for TimeStamp, TimeDuration +#include "nsTArray.h" // for nsAutoTArray, nsTArray_Impl, etc namespace mozilla { namespace gl { @@ -12,6 +15,8 @@ class GLContext; } namespace layers { +class ShaderProgramOGL; + const double kFpsWindowMs = 250.0; const size_t kNumFrameTimeStamps = 16; struct FPSCounter { diff --git a/gfx/layers/opengl/GLManager.cpp b/gfx/layers/opengl/GLManager.cpp index 377cf26d0147..056e17b8b445 100644 --- a/gfx/layers/opengl/GLManager.cpp +++ b/gfx/layers/opengl/GLManager.cpp @@ -1,8 +1,22 @@ +/* -*- 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 "GLManager.h" -#include "LayerManagerOGL.h" -#include "CompositorOGL.h" +#include "CompositorOGL.h" // for CompositorOGL +#include "GLContext.h" // for GLContext +#include "LayerManagerOGL.h" // for LayerManagerOGL +#include "Layers.h" // for LayerManager +#include "mozilla/Assertions.h" // for MOZ_CRASH +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/layers/Compositor.h" // for Compositor #include "mozilla/layers/LayerManagerComposite.h" -#include "GLContext.h" +#include "mozilla/layers/LayersTypes.h" +#include "mozilla/mozalloc.h" // for operator new, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" // for LayerManager::AddRef, etc using namespace mozilla::gl; diff --git a/gfx/layers/opengl/GLManager.h b/gfx/layers/opengl/GLManager.h index cff0cf5f4f07..5f3a65123c7d 100644 --- a/gfx/layers/opengl/GLManager.h +++ b/gfx/layers/opengl/GLManager.h @@ -6,14 +6,18 @@ #ifndef MOZILLA_GFX_GLMANAGER_H #define MOZILLA_GFX_GLMANAGER_H -#include "LayerManagerOGL.h" +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "LayerManagerOGLProgram.h" namespace mozilla { namespace gl { class GLContext; } + namespace layers { +class LayerManager; + /** * Minimal interface to allow widgets to draw using OpenGL. Abstracts * LayerManagerOGL and CompositorOGL. Call CreateGLManager with either a diff --git a/gfx/layers/opengl/ImageLayerOGL.cpp b/gfx/layers/opengl/ImageLayerOGL.cpp index 3cf55b9076e0..7bb725475d52 100644 --- a/gfx/layers/opengl/ImageLayerOGL.cpp +++ b/gfx/layers/opengl/ImageLayerOGL.cpp @@ -3,20 +3,34 @@ * 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 "gfxSharedImageSurface.h" - -#include "ImageContainer.h" // for PlanarYCBCRImage -#include "ipc/AutoOpenSurface.h" #include "ImageLayerOGL.h" -#include "gfxImageSurface.h" -#include "gfxUtils.h" -#include "yuv_convert.h" -#include "GLContextProvider.h" +#include // for uint32_t +#include "mozilla-config.h" // for GL_PROVIDER_GLX +#include "GLDefs.h" // for LOCAL_GL_TEXTURE_2D, etc +#include "ImageContainer.h" // for CairoImage, etc +#include "ImageTypes.h" // for ImageFormat::CAIRO_SURFACE, etc +#include "SharedTextureImage.h" // for SharedTextureImage::Data, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxUtils.h" // for NextPowerOfTwo +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat +#include "mozilla/layers/LayersTypes.h" +#include "nsAutoRef.h" // for nsCountedRef, nsAutoRefBase +#include "nsCOMPtr.h" // for nsCOMPtr, already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION, NS_ERROR +#include "nsIRunnable.h" // for nsIRunnable +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "nsThreadUtils.h" // for nsRunnable +#include "nscore.h" // for NS_IMETHOD +#include "LayerManagerOGL.h" // for LayerOGL::GLContext, etc #if defined(GL_PROVIDER_GLX) # include "GLXLibrary.h" # include "gfxXlibSurface.h" #endif -#include "SharedTextureImage.h" using namespace mozilla::gfx; using namespace mozilla::gl; @@ -24,6 +38,8 @@ using namespace mozilla::gl; namespace mozilla { namespace layers { +class Layer; + /** * This is an event used to unref a GLContext on the main thread and * optionally delete a texture associated with that context. diff --git a/gfx/layers/opengl/ImageLayerOGL.h b/gfx/layers/opengl/ImageLayerOGL.h index 264b8d69517f..2c9a8890c670 100644 --- a/gfx/layers/opengl/ImageLayerOGL.h +++ b/gfx/layers/opengl/ImageLayerOGL.h @@ -6,20 +6,27 @@ #ifndef GFX_IMAGELAYEROGL_H #define GFX_IMAGELAYEROGL_H -#include "mozilla/layers/PLayerTransaction.h" +#include "GLContext.h" // for GLContext +#include "GLContextTypes.h" // for GLuint +#include "ImageContainer.h" // for ImageBackendData, etc +#include "ImageLayers.h" // for ImageLayer +#include "LayerManagerOGL.h" // for LayerOGL +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Mutex.h" // for Mutex +#include "mozilla/mozalloc.h" // for operator delete +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" // for TextureRecycleBin::Release, etc +#include "nsTArray.h" // for nsTArray +#include "opengl/LayerManagerOGLProgram.h" // for ShaderProgramType, etc -#include "LayerManagerOGL.h" -#include "ImageLayers.h" -#include "ImageContainer.h" -#include "yuv_convert.h" -#include "mozilla/Mutex.h" +struct nsIntPoint; namespace mozilla { namespace layers { -class CairoImage; -class PlanarYCbCrImage; class BlobYCbCrSurface; +class Layer; /** * This class wraps a GL texture. It includes a GLContext reference diff --git a/gfx/layers/opengl/LayerManagerOGL.cpp b/gfx/layers/opengl/LayerManagerOGL.cpp index 74d592cfa1bc..7b2551a2eb71 100644 --- a/gfx/layers/opengl/LayerManagerOGL.cpp +++ b/gfx/layers/opengl/LayerManagerOGL.cpp @@ -4,42 +4,49 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "LayerManagerOGL.h" - -#include "mozilla/layers/PLayerTransaction.h" -#include - -/* This must occur *after* layers/PLayerTransaction.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" - -#include "Composer2D.h" -#include "ThebesLayerOGL.h" -#include "ContainerLayerOGL.h" -#include "ImageLayerOGL.h" -#include "ColorLayerOGL.h" -#include "CanvasLayerOGL.h" -#include "mozilla/TimeStamp.h" -#include "mozilla/Preferences.h" -#include "TexturePoolOGL.h" - -#include "gfxContext.h" -#include "gfxUtils.h" -#include "gfxPlatform.h" -#include "nsIWidget.h" - -#include "GLContext.h" -#include "GLContextProvider.h" -#include "Composer2D.h" -#include "FPSCounter.h" - -#include "nsIServiceManager.h" -#include "nsIConsoleService.h" - -#include "gfxCrashReporterUtils.h" - -#include "GeckoProfiler.h" - +#include // for size_t +#include // for uint32_t, uint8_t, etc +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "CanvasLayerOGL.h" // for CanvasLayerOGL +#include "ColorLayerOGL.h" // for ColorLayerOGL +#include "Composer2D.h" // for Composer2D +#include "ContainerLayerOGL.h" // for ContainerLayerOGL +#include "FPSCounter.h" // for FPSState, FPSCounter +#include "GLContext.h" // for GLContext, etc +#include "GLContextProvider.h" // for GLContextProvider +#include "GeckoProfilerFunc.h" // for TimeStamp +#include "GeckoProfiler.h" // for PROFILER_LABEL +#include "ImageLayerOGL.h" // for ImageLayerOGL +#include "ImageLayers.h" // for ImageLayer +#include "ThebesLayerOGL.h" // for ThebesLayerOGL +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxContext.h" // for gfxContext, etc +#include "gfxCrashReporterUtils.h" // for ScopedGfxFeatureReporter +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPlatform.h" // for gfxPlatform +#include "gfxRect.h" // for gfxRect +#include "gfxUtils.h" // for NextPowerOfTwo, gfxUtils, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Preferences.h" // for Preferences +#include "mozilla/TimeStamp.h" // for TimeStamp +#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsIConsoleService.h" // for nsIConsoleService, etc +#include "nsIWidget.h" // for nsIWidget +#include "nsLiteralString.h" // for NS_LITERAL_STRING +#include "nsPoint.h" // for nsIntPoint +#include "nsServiceManagerUtils.h" // for do_GetService +#include "nsString.h" // for nsAutoCString, nsString, etc +#include "LayerManagerOGLProgram.h" // for ShaderProgramOGL, etc +#ifdef XP_WIN +#include "prenv.h" // for PR_GetEnv +#endif #ifdef MOZ_WIDGET_ANDROID #include +#include "TexturePoolOGL.h" #endif #ifdef XP_MACOSX #include "gfxPlatformMac.h" diff --git a/gfx/layers/opengl/LayerManagerOGL.h b/gfx/layers/opengl/LayerManagerOGL.h index 806a5e93f197..bfa22e2fafb2 100644 --- a/gfx/layers/opengl/LayerManagerOGL.h +++ b/gfx/layers/opengl/LayerManagerOGL.h @@ -6,31 +6,53 @@ #ifndef GFX_LAYERMANAGEROGL_H #define GFX_LAYERMANAGEROGL_H +#include // for int32_t +#include "GLDefs.h" // for GLuint, GLenum, GLintptr, etc +#include "LayerManagerOGLProgram.h" // for ShaderProgramOGL, etc #include "Layers.h" -#include "LayerManagerOGLProgram.h" - -#include "mozilla/TimeStamp.h" -#include "nsPoint.h" - +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPoint.h" // for gfxIntSize +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE, MOZ_FINAL +#include "mozilla/RefPtr.h" // for TemporaryRef +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Types.h" // for SurfaceFormat, etc +#include "mozilla/layers/CompositorTypes.h" // for MaskType::MaskNone, etc +#include "mozilla/layers/LayersTypes.h" // for LayersBackend, etc +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr, nsAutoPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING +#include "nsISupportsImpl.h" // for Layer::AddRef, etc +#include "nsRect.h" // for nsIntRect +#include "nsRegion.h" // for nsIntRegion +#include "nsSize.h" // for nsIntSize +#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc +#include "nsThreadUtils.h" // for nsRunnable +#include "nscore.h" // for NS_IMETHOD, nsAString, etc #ifdef XP_WIN #include #endif #define BUFFER_OFFSET(i) ((char *)nullptr + (i)) -#include "gfxContext.h" -#include "gfx3DMatrix.h" -#include "nsIWidget.h" -#include "GLContextTypes.h" -#include "GLDefs.h" +class gfx3DMatrix; +class gfxASurface; +class gfxContext; +class nsIWidget; +struct nsIntPoint; namespace mozilla { namespace gl { class GLContext; } +namespace gfx { +class DrawTarget; +} namespace layers { class Composer2D; +class ImageLayer; class LayerOGL; class ThebesLayerComposite; class ContainerLayerComposite; diff --git a/gfx/layers/opengl/LayerManagerOGLProgram.cpp b/gfx/layers/opengl/LayerManagerOGLProgram.cpp index b00bfa7c8c52..bbeee1623779 100644 --- a/gfx/layers/opengl/LayerManagerOGLProgram.cpp +++ b/gfx/layers/opengl/LayerManagerOGLProgram.cpp @@ -2,15 +2,23 @@ * 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/DebugOnly.h" - #include "LayerManagerOGLProgram.h" - -#include "LayerManagerOGLShaders.h" +#include // for uint32_t +#include "gfxMatrix.h" // for gfxMatrix +#include "gfxPoint.h" // for gfxIntSize, gfxPoint, etc +#include "gfxRect.h" // for gfxRect +#include "mozilla/DebugOnly.h" // for DebugOnly +#include "nsAString.h" +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsString.h" // for nsAutoCString +#include "prenv.h" // for PR_GetEnv #include "LayerManagerOGL.h" - +#include "LayerManagerOGLShaders.h" +#include "Layers.h" #include "GLContext.h" +struct gfxRGBA; + namespace mozilla { namespace layers { diff --git a/gfx/layers/opengl/LayerManagerOGLProgram.h b/gfx/layers/opengl/LayerManagerOGLProgram.h index 34b40d20c950..e0b5fe4bd4db 100644 --- a/gfx/layers/opengl/LayerManagerOGLProgram.h +++ b/gfx/layers/opengl/LayerManagerOGLProgram.h @@ -6,21 +6,21 @@ #ifndef GFX_LAYERMANAGEROGLPROGRAM_H #define GFX_LAYERMANAGEROGLPROGRAM_H -#include - -#include "prenv.h" - -#include "nsString.h" -#include "nsTArray.h" -#include "GLContextTypes.h" -#include "GLDefs.h" -#include "gfx3DMatrix.h" -#include "mozilla/layers/LayersTypes.h" +#include "GLDefs.h" // for GLint, GLenum, GLuint, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/Matrix.h" // for Matrix4x4 +#include "mozilla/gfx/Rect.h" // for Rect +#include "mozilla/gfx/Types.h" +#include "nsDebug.h" // for NS_ASSERTION +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsTArray.h" // for nsTArray #include "mozilla/layers/CompositorTypes.h" -#include "gfxColor.h" -#include "mozilla/gfx/Matrix.h" -#include "mozilla/RefPtr.h" -#include "gfxASurface.h" + +struct gfxRGBA; namespace mozilla { namespace gl { diff --git a/gfx/layers/opengl/TextureClientOGL.cpp b/gfx/layers/opengl/TextureClientOGL.cpp index 08490acbf68d..05b5f834bbf4 100644 --- a/gfx/layers/opengl/TextureClientOGL.cpp +++ b/gfx/layers/opengl/TextureClientOGL.cpp @@ -4,16 +4,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/layers/TextureClientOGL.h" -#include "mozilla/layers/CompositableClient.h" -#include "mozilla/layers/CompositableForwarder.h" -#include "GLContext.h" -#include "gfxipc/ShadowLayerUtils.h" +#include "GLContext.h" // for GLContext, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/layers/ISurfaceAllocator.h" +#include "nsSize.h" // for nsIntSize using namespace mozilla::gl; namespace mozilla { namespace layers { +class CompositableForwarder; + SharedTextureClientOGL::SharedTextureClientOGL() : mHandle(0), mIsCrossProcess(false), mInverted(false) { diff --git a/gfx/layers/opengl/TextureClientOGL.h b/gfx/layers/opengl/TextureClientOGL.h index fa00ba007997..2f414d64b19f 100644 --- a/gfx/layers/opengl/TextureClientOGL.h +++ b/gfx/layers/opengl/TextureClientOGL.h @@ -6,10 +6,13 @@ #ifndef MOZILLA_GFX_TEXTURECLIENTOGL_H #define MOZILLA_GFX_TEXTURECLIENTOGL_H -#include "mozilla/layers/TextureClient.h" -#include "ISurfaceAllocator.h" // For IsSurfaceDescriptorValid -#include "GLContext.h" // For SharedTextureHandle - +#include "GLContext.h" // for SharedTextureHandle, etc +#include "gfxASurface.h" // for gfxASurface, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/layers/CompositorTypes.h" +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/TextureClient.h" // for DeprecatedTextureClient, etc #ifdef MOZ_WIDGET_GONK #include #endif @@ -17,7 +20,7 @@ namespace mozilla { namespace layers { - +class CompositableForwarder; /** * A TextureClient implementation to share TextureMemory that is already diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index 1785e1d81c2f..bc624c6b504b 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -4,19 +4,28 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "TextureHostOGL.h" -#include "ipc/AutoOpenSurface.h" -#include "gfx2DGlue.h" +#include "GLContext.h" // for GLContext, etc +#include "SharedSurface.h" // for SharedSurface +#include "SharedSurfaceEGL.h" // for SharedSurface_EGLImage +#include "SharedSurfaceGL.h" // for SharedSurface_GLTexture, etc +#include "SurfaceStream.h" // for SurfaceStream +#include "SurfaceTypes.h" // for SharedSurfaceType, etc +#include "TiledLayerBuffer.h" // for TILEDLAYERBUFFER_TILE_SIZE +#include "gfx2DGlue.h" // for ContentForFormat, etc +#include "gfxImageSurface.h" // for gfxImageSurface +#include "gfxPoint.h" // for gfxIntSize +#include "gfxReusableSurfaceWrapper.h" // for gfxReusableSurfaceWrapper +#include "ipc/AutoOpenSurface.h" // for AutoOpenSurface +#include "mozilla/gfx/2D.h" // for DataSourceSurface +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/layers/CompositorOGL.h" // for CompositorOGL +#include "mozilla/layers/ISurfaceAllocator.h" #include "mozilla/layers/YCbCrImageDataSerializer.h" -#include "GLContext.h" -#include "gfxImageSurface.h" -#include "SurfaceStream.h" -#include "SharedSurface.h" -#include "SharedSurfaceGL.h" -#include "SharedSurfaceEGL.h" +#include "nsPoint.h" // for nsIntPoint +#include "nsRegion.h" // for nsIntRegion #ifdef XP_MACOSX #include "SharedSurfaceIO.h" #endif -#include "mozilla/layers/CompositorOGL.h" using namespace mozilla::gl; using namespace mozilla::gfx; @@ -24,6 +33,8 @@ using namespace mozilla::gfx; namespace mozilla { namespace layers { +class Compositor; + TemporaryRef CreateDeprecatedTextureHostOGL(SurfaceDescriptorType aDescriptorType, uint32_t aDeprecatedTextureHostFlags, diff --git a/gfx/layers/opengl/TextureHostOGL.h b/gfx/layers/opengl/TextureHostOGL.h index d1b7f43ada45..64628e953fc9 100644 --- a/gfx/layers/opengl/TextureHostOGL.h +++ b/gfx/layers/opengl/TextureHostOGL.h @@ -6,22 +6,53 @@ #ifndef MOZILLA_GFX_TEXTUREOGL_H #define MOZILLA_GFX_TEXTUREOGL_H -#include "ImageLayerOGL.h" -#include "GLContextTypes.h" -#include "gfx2DGlue.h" -#include "mozilla/layers/Effects.h" -#include "gfxReusableSurfaceWrapper.h" -#include "TiledLayerBuffer.h" // for TILEDLAYERBUFFER_TILE_SIZE - +#include // for size_t +#include // for uint64_t +#include "GLContext.h" // for GLContext, etc +#include "GLContextTypes.h" // for GLenum, GLuint +#include "GLDefs.h" // for LOCAL_GL_CLAMP_TO_EDGE, etc +#include "GLTextureImage.h" // for TextureImage +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "IPCMessageUtils.h" // for gfxContentType +#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE +#include "mozilla/RefPtr.h" // for RefPtr +#include "mozilla/gfx/Point.h" // for IntSize, IntPoint +#include "mozilla/gfx/Types.h" // for SurfaceFormat, etc +#include "mozilla/layers/CompositorTypes.h" // for TextureFlags +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor +#include "mozilla/layers/LayersTypes.h" // for MOZ_LAYERS_HAVE_LOG +#include "mozilla/layers/TextureHost.h" // for DeprecatedTextureHost, etc +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_WARNING +#include "nsISupportsImpl.h" // for TextureImage::Release, etc +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc +#include "LayerManagerOGLProgram.h" // for ShaderProgramType, etc #ifdef MOZ_WIDGET_GONK #include #endif +class gfxImageSurface; +class gfxReusableSurfaceWrapper; +class nsIntRegion; +struct nsIntPoint; + namespace mozilla { +namespace gfx { +class DataSourceSurface; +class SurfaceStream; +} + namespace layers { -class TextureImageDeprecatedTextureHostOGL; +class Compositor; class CompositorOGL; +class TextureImageDeprecatedTextureHostOGL; /* * TextureHost implementations for the OpenGL backend. diff --git a/gfx/layers/opengl/TexturePoolOGL.cpp b/gfx/layers/opengl/TexturePoolOGL.cpp index 1aa6092d6f88..a2c63f6a12cc 100644 --- a/gfx/layers/opengl/TexturePoolOGL.cpp +++ b/gfx/layers/opengl/TexturePoolOGL.cpp @@ -3,9 +3,12 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "TexturePoolOGL.h" -#include "GLContext.h" -#include "nsDeque.h" -#include "mozilla/Monitor.h" +#include // for malloc +#include "GLContext.h" // for GLContext +#include "mozilla/Monitor.h" // for Monitor, MonitorAutoLock +#include "mozilla/mozalloc.h" // for operator delete, etc +#include "nsDebug.h" // for NS_ASSERTION, NS_ERROR, etc +#include "nsDeque.h" // for nsDeque #define TEXTURE_POOL_SIZE 10 diff --git a/gfx/layers/opengl/TexturePoolOGL.h b/gfx/layers/opengl/TexturePoolOGL.h index 32a34aad6b4e..9b36ebe617ae 100644 --- a/gfx/layers/opengl/TexturePoolOGL.h +++ b/gfx/layers/opengl/TexturePoolOGL.h @@ -5,11 +5,13 @@ #ifndef GFX_TEXTUREPOOLOGL_H #define GFX_TEXTUREPOOLOGL_H -#include "GLContext.h" +#include "GLContextTypes.h" // for GLuint namespace mozilla { namespace gl { +class GLContext; + // A texture pool for for the on-screen GLContext. The main purpose of this class // is to provide the ability to easily allocate an on-screen texture from the // content thread. The unfortunate nature of the SurfaceTexture API (see nsSurfaceTexture) diff --git a/gfx/layers/opengl/ThebesLayerOGL.cpp b/gfx/layers/opengl/ThebesLayerOGL.cpp index 89b21083aac1..41b1a6db7632 100644 --- a/gfx/layers/opengl/ThebesLayerOGL.cpp +++ b/gfx/layers/opengl/ThebesLayerOGL.cpp @@ -3,20 +3,37 @@ * 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 "ipc/AutoOpenSurface.h" -#include "mozilla/layers/PLayerTransaction.h" -#include "TiledLayerBuffer.h" - -/* This must occur *after* layers/PLayerTransaction.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" - -#include "ThebesLayerBuffer.h" #include "ThebesLayerOGL.h" -#include "gfxUtils.h" -#include "gfxTeeSurface.h" +#include // for uint32_t +#include // for int32_t +#include "mozilla-config.h" // for MOZ_DUMP_PAINTING +#include "GLContext.h" // for GLContext, etc +#include "GLContextTypes.h" // for GLenum +#include "GLDefs.h" // for LOCAL_GL_ONE, LOCAL_GL_BGRA, etc +#include "GLTextureImage.h" // for TextureImage, etc +#include "ThebesLayerBuffer.h" // for ThebesLayerBuffer, etc +#include "gfx3DMatrix.h" // for gfx3DMatrix +#include "gfxASurface.h" // for gfxASurface, etc +#include "gfxColor.h" // for gfxRGBA +#include "gfxContext.h" // for gfxContext, etc +#include "gfxImageSurface.h" // for gfxImageSurface #include "gfxPlatform.h" - -#include "base/message_loop.h" +#include "gfxPoint.h" // for gfxPoint +#include "gfxTeeSurface.h" // for gfxTeeSurface +#include "gfxUtils.h" // for gfxUtils, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/gfx/BasePoint.h" // for BasePoint +#include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/BaseSize.h" // for BaseSize +#include "mozilla/mozalloc.h" // for operator new +#include "nsCOMPtr.h" // for already_AddRefed +#include "nsDebug.h" // for NS_ASSERTION, etc +#include "nsPoint.h" // for nsIntPoint +#include "nsRect.h" // for nsIntRect +#include "nsSize.h" // for nsIntSize +#include "LayerManagerOGL.h" // for LayerManagerOGL, etc +#include "LayerManagerOGLProgram.h" // for ShaderProgramOGL, etc namespace mozilla { namespace layers { diff --git a/gfx/layers/opengl/ThebesLayerOGL.h b/gfx/layers/opengl/ThebesLayerOGL.h index 3163e19154e9..4656ccf1e049 100644 --- a/gfx/layers/opengl/ThebesLayerOGL.h +++ b/gfx/layers/opengl/ThebesLayerOGL.h @@ -6,12 +6,11 @@ #ifndef GFX_THEBESLAYEROGL_H #define GFX_THEBESLAYEROGL_H -#include "Layers.h" -#include "LayerManagerOGL.h" -#include "gfxImageSurface.h" -#include "GLContext.h" -#include "base/task.h" - +#include "LayerManagerOGL.h" // for LayerOGL +#include "Layers.h" // for Layer (ptr only), etc +#include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" +#include "nsRegion.h" // for nsIntRegion namespace mozilla { namespace layers {