diff --git a/image/ClippedImage.cpp b/image/ClippedImage.cpp index a5ec461c19bf..2434c8598413 100644 --- a/image/ClippedImage.cpp +++ b/image/ClippedImage.cpp @@ -25,7 +25,6 @@ namespace mozilla { using namespace gfx; using layers::ImageContainer; -using layers::LayerManager; using std::make_pair; using std::max; using std::modf; @@ -290,10 +289,10 @@ std::pair> ClippedImage::GetFrameInternal( } NS_IMETHODIMP_(bool) -ClippedImage::IsImageContainerAvailable(LayerManager* aManager, +ClippedImage::IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) { if (!ShouldClip()) { - return InnerImage()->IsImageContainerAvailable(aManager, aFlags); + return InnerImage()->IsImageContainerAvailable(aRenderer, aFlags); } return false; } diff --git a/image/ClippedImage.h b/image/ClippedImage.h index fd4fd1dbf012..1f0c9d635e61 100644 --- a/image/ClippedImage.h +++ b/image/ClippedImage.h @@ -43,7 +43,7 @@ class ClippedImage : public ImageWrapper { GetFrameAtSize(const gfx::IntSize& aSize, uint32_t aWhichFrame, uint32_t aFlags) override; NS_IMETHOD_(bool) - IsImageContainerAvailable(layers::LayerManager* aManager, + IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) override; NS_IMETHOD_(ImgDrawResult) GetImageContainerAtSize(WindowRenderer* aRenderer, const gfx::IntSize& aSize, diff --git a/image/DynamicImage.cpp b/image/DynamicImage.cpp index af0f09b6cac4..7a4145691bb6 100644 --- a/image/DynamicImage.cpp +++ b/image/DynamicImage.cpp @@ -20,7 +20,6 @@ using namespace mozilla; using namespace mozilla::gfx; using mozilla::layers::ImageContainer; -using mozilla::layers::LayerManager; namespace mozilla { namespace image { @@ -165,7 +164,7 @@ NS_IMETHODIMP_(bool) DynamicImage::WillDrawOpaqueNow() { return false; } NS_IMETHODIMP_(bool) -DynamicImage::IsImageContainerAvailable(LayerManager* aManager, +DynamicImage::IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) { return false; } diff --git a/image/FrozenImage.cpp b/image/FrozenImage.cpp index 9051e4f0a553..d77fa7182241 100644 --- a/image/FrozenImage.cpp +++ b/image/FrozenImage.cpp @@ -9,7 +9,6 @@ namespace mozilla { using namespace gfx; using layers::ImageContainer; -using layers::LayerManager; namespace image { @@ -52,10 +51,10 @@ bool FrozenImage::IsNonAnimated() const { } NS_IMETHODIMP_(bool) -FrozenImage::IsImageContainerAvailable(LayerManager* aManager, +FrozenImage::IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) { if (IsNonAnimated()) { - return InnerImage()->IsImageContainerAvailable(aManager, aFlags); + return InnerImage()->IsImageContainerAvailable(aRenderer, aFlags); } return false; } diff --git a/image/FrozenImage.h b/image/FrozenImage.h index d022d626b652..3dcf8fae1413 100644 --- a/image/FrozenImage.h +++ b/image/FrozenImage.h @@ -42,7 +42,7 @@ class FrozenImage : public ImageWrapper { GetFrameAtSize(const gfx::IntSize& aSize, uint32_t aWhichFrame, uint32_t aFlags) override; NS_IMETHOD_(bool) - IsImageContainerAvailable(layers::LayerManager* aManager, + IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) override; NS_IMETHOD_(ImgDrawResult) GetImageContainerAtSize(WindowRenderer* aRenderer, const gfx::IntSize& aSize, diff --git a/image/ImageWrapper.cpp b/image/ImageWrapper.cpp index 73af9b6c07c2..38e60eec1a79 100644 --- a/image/ImageWrapper.cpp +++ b/image/ImageWrapper.cpp @@ -18,7 +18,6 @@ using gfx::IntSize; using gfx::SamplingFilter; using gfx::SourceSurface; using layers::ImageContainer; -using layers::LayerManager; namespace image { @@ -166,9 +165,9 @@ NS_IMETHODIMP_(bool) ImageWrapper::WillDrawOpaqueNow() { return mInnerImage->WillDrawOpaqueNow(); } NS_IMETHODIMP_(bool) -ImageWrapper::IsImageContainerAvailable(LayerManager* aManager, +ImageWrapper::IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) { - return mInnerImage->IsImageContainerAvailable(aManager, aFlags); + return mInnerImage->IsImageContainerAvailable(aRenderer, aFlags); } NS_IMETHODIMP_(ImgDrawResult) diff --git a/image/OrientedImage.cpp b/image/OrientedImage.cpp index 064713338444..eaa43b335c3e 100644 --- a/image/OrientedImage.cpp +++ b/image/OrientedImage.cpp @@ -21,7 +21,6 @@ namespace mozilla { using namespace gfx; using layers::ImageContainer; -using layers::LayerManager; namespace image { @@ -148,10 +147,10 @@ OrientedImage::GetFrameAtSize(const IntSize& aSize, uint32_t aWhichFrame, } NS_IMETHODIMP_(bool) -OrientedImage::IsImageContainerAvailable(LayerManager* aManager, +OrientedImage::IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) { if (mOrientation.IsIdentity()) { - return InnerImage()->IsImageContainerAvailable(aManager, aFlags); + return InnerImage()->IsImageContainerAvailable(aRenderer, aFlags); } return false; } diff --git a/image/OrientedImage.h b/image/OrientedImage.h index a91b22a88553..2fa704a94ab9 100644 --- a/image/OrientedImage.h +++ b/image/OrientedImage.h @@ -38,7 +38,7 @@ class OrientedImage : public ImageWrapper { GetFrameAtSize(const gfx::IntSize& aSize, uint32_t aWhichFrame, uint32_t aFlags) override; NS_IMETHOD_(bool) - IsImageContainerAvailable(layers::LayerManager* aManager, + IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) override; NS_IMETHOD_(ImgDrawResult) GetImageContainerAtSize(WindowRenderer* aRenderer, const gfx::IntSize& aSize, diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp index 96ce3754086e..a7b0ff969105 100644 --- a/image/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -645,7 +645,7 @@ Tuple RasterImage::GetImageContainerSize( } NS_IMETHODIMP_(bool) -RasterImage::IsImageContainerAvailable(LayerManager* aManager, +RasterImage::IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) { return LoadHasSize(); } diff --git a/image/VectorImage.cpp b/image/VectorImage.cpp index afad76540400..129bd85ed014 100644 --- a/image/VectorImage.cpp +++ b/image/VectorImage.cpp @@ -19,7 +19,6 @@ #include "mozilla/dom/SVGDocument.h" #include "mozilla/gfx/2D.h" #include "mozilla/gfx/gfxVars.h" -#include "mozilla/layers/LayerManager.h" #include "mozilla/PendingAnimationTracker.h" #include "mozilla/PresShell.h" #include "mozilla/ProfilerLabels.h" @@ -809,10 +808,10 @@ Tuple VectorImage::GetImageContainerSize( } NS_IMETHODIMP_(bool) -VectorImage::IsImageContainerAvailable(LayerManager* aManager, +VectorImage::IsImageContainerAvailable(WindowRenderer* aRenderer, uint32_t aFlags) { if (mError || !mIsFullyLoaded || - aManager->GetBackendType() != LayersBackend::LAYERS_WR) { + aRenderer->GetBackendType() != LayersBackend::LAYERS_WR) { return false; } diff --git a/image/imgIContainer.idl b/image/imgIContainer.idl index e88e2386d1fe..88eccdb5b247 100644 --- a/image/imgIContainer.idl +++ b/image/imgIContainer.idl @@ -31,7 +31,6 @@ class SourceSurface; class WindowRenderer; namespace layers { -class LayerManager; class ImageContainer; } } @@ -72,7 +71,6 @@ native nsSize(nsSize); native TempRefImageContainer(already_AddRefed); [ptr] native ImageContainer(mozilla::layers::ImageContainer); [ref] native ImageRegion(mozilla::image::ImageRegion); -[ptr] native LayerManager(mozilla::layers::LayerManager); [ptr] native WindowRenderer(mozilla::WindowRenderer); native Orientation(mozilla::image::Orientation); native ImageResolution(mozilla::image::Resolution); @@ -319,10 +317,10 @@ interface imgIContainer : nsISupports /** * @return true if getImageContainer() is expected to return a valid - * ImageContainer when passed the given @Manager and @Flags + * ImageContainer when passed the given @Renderer and @Flags * parameters. */ - [noscript, notxpcom] boolean isImageContainerAvailable(in LayerManager aManager, + [noscript, notxpcom] boolean isImageContainerAvailable(in WindowRenderer aRenderer, in uint32_t aFlags); /** diff --git a/layout/painting/nsCSSRendering.cpp b/layout/painting/nsCSSRendering.cpp index 641e39a3aca9..f3478c86ca15 100644 --- a/layout/painting/nsCSSRendering.cpp +++ b/layout/painting/nsCSSRendering.cpp @@ -1809,7 +1809,7 @@ ImgDrawResult nsCSSRendering::PaintStyleImageLayer(const PaintBGParams& aParams, } bool nsCSSRendering::CanBuildWebRenderDisplayItemsForStyleImageLayer( - LayerManager* aManager, nsPresContext& aPresCtx, nsIFrame* aFrame, + WebRenderLayerManager* aManager, nsPresContext& aPresCtx, nsIFrame* aFrame, const nsStyleBackground* aBackgroundStyle, int32_t aLayer, uint32_t aPaintFlags) { if (!aBackgroundStyle) { diff --git a/layout/painting/nsCSSRendering.h b/layout/painting/nsCSSRendering.h index fbf69fae77f5..598486993d8f 100644 --- a/layout/painting/nsCSSRendering.h +++ b/layout/painting/nsCSSRendering.h @@ -36,7 +36,7 @@ namespace layers { class ImageContainer; class StackingContextHelper; class WebRenderParentCommand; -class LayerManager; +class WebRenderLayerManager; class RenderRootStateManager; } // namespace layers @@ -103,7 +103,7 @@ struct nsCSSRendering { typedef mozilla::gfx::Rect Rect; typedef mozilla::gfx::Size Size; typedef mozilla::gfx::RectCornerRadii RectCornerRadii; - typedef mozilla::layers::LayerManager LayerManager; + typedef mozilla::layers::WebRenderLayerManager WebRenderLayerManager; typedef mozilla::image::ImgDrawResult ImgDrawResult; typedef nsIFrame::Sides Sides; @@ -505,9 +505,9 @@ struct nsCSSRendering { mozilla::ComputedStyle* mBackgroundSC, const nsStyleBorder& aBorder); static bool CanBuildWebRenderDisplayItemsForStyleImageLayer( - LayerManager* aManager, nsPresContext& aPresCtx, nsIFrame* aFrame, - const nsStyleBackground* aBackgroundStyle, int32_t aLayer, - uint32_t aPaintFlags); + WebRenderLayerManager* aManager, nsPresContext& aPresCtx, + nsIFrame* aFrame, const nsStyleBackground* aBackgroundStyle, + int32_t aLayer, uint32_t aPaintFlags); static ImgDrawResult BuildWebRenderDisplayItemsForStyleImageLayer( const PaintBGParams& aParams, mozilla::wr::DisplayListBuilder& aBuilder, mozilla::wr::IpcResourceUpdateQueue& aResources, diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index b87c345b589a..ab3b63b27271 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -3615,7 +3615,7 @@ static void CheckForBorderItem(nsDisplayItem* aItem, uint32_t& aFlags) { } bool nsDisplayBackgroundImage::CanBuildWebRenderDisplayItems( - LayerManager* aManager, nsDisplayListBuilder* aBuilder) { + WebRenderLayerManager* aManager, nsDisplayListBuilder* aBuilder) { if (aBuilder) { mImageFlags = aBuilder->GetBackgroundPaintFlags(); } diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h index 63755b28e6ad..2d7161fd2c08 100644 --- a/layout/painting/nsDisplayList.h +++ b/layout/painting/nsDisplayList.h @@ -4357,7 +4357,7 @@ class nsDisplayBackgroundImage : public nsPaintedDisplayItem { } protected: - bool CanBuildWebRenderDisplayItems(LayerManager* aManager, + bool CanBuildWebRenderDisplayItems(layers::WebRenderLayerManager* aManager, nsDisplayListBuilder* aBuilder); nsRect GetBoundsInternal(nsDisplayListBuilder* aBuilder, nsIFrame* aFrameForBounds = nullptr); diff --git a/layout/painting/nsImageRenderer.h b/layout/painting/nsImageRenderer.h index e7cc8cd1d0be..15fcb186df00 100644 --- a/layout/painting/nsImageRenderer.h +++ b/layout/painting/nsImageRenderer.h @@ -96,7 +96,6 @@ struct CSSSizeOrRatio { class nsImageRenderer { public: typedef mozilla::image::ImgDrawResult ImgDrawResult; - typedef mozilla::layers::LayerManager LayerManager; typedef mozilla::layers::ImageContainer ImageContainer; enum {