From c1e322c6c5fada2df09360a53c0f015062ee9472 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 30 Jun 2016 10:24:27 -0700 Subject: [PATCH] Bug 1282670, part 1: Add missing #include & "using" declarations in imagelib. r=seth I found these issues locally by moving all of imagelib's .cpp files to SOURCES instead of UNIFIED_SOURCES. (That change isn't part of this patch, though.) MozReview-Commit-ID: 97Xpfu8eFE6 --- image/Downscaler.cpp | 4 ++++ image/Downscaler.h | 1 + image/FrozenImage.cpp | 2 ++ image/ImageCacheKey.h | 1 + image/ImageWrapper.cpp | 1 + image/MultipartImage.cpp | 4 ++++ image/SurfacePipe.h | 2 ++ image/decoders/nsICODecoder.h | 5 +++-- image/imgFrame.cpp | 1 + 9 files changed, 19 insertions(+), 2 deletions(-) diff --git a/image/Downscaler.cpp b/image/Downscaler.cpp index 18781e3bd9b7..18f09c596117 100644 --- a/image/Downscaler.cpp +++ b/image/Downscaler.cpp @@ -10,6 +10,7 @@ #include #include "gfxPrefs.h" #include "image_operations.h" +#include "mozilla/gfx/2D.h" #include "mozilla/SSE.h" #include "mozilla/mips.h" #include "convolver.h" @@ -19,6 +20,9 @@ using std::max; using std::swap; namespace mozilla { + +using gfx::IntRect; + namespace image { Downscaler::Downscaler(const nsIntSize& aTargetSize) diff --git a/image/Downscaler.h b/image/Downscaler.h index 2da898b06433..21179a38f200 100644 --- a/image/Downscaler.h +++ b/image/Downscaler.h @@ -14,6 +14,7 @@ #include "mozilla/Maybe.h" #include "mozilla/UniquePtr.h" +#include "gfxPoint.h" #include "nsRect.h" namespace skia { diff --git a/image/FrozenImage.cpp b/image/FrozenImage.cpp index b5653966d79b..46047e71ff3f 100644 --- a/image/FrozenImage.cpp +++ b/image/FrozenImage.cpp @@ -8,6 +8,8 @@ namespace mozilla { using namespace gfx; +using layers::ImageContainer; +using layers::LayerManager; namespace image { diff --git a/image/ImageCacheKey.h b/image/ImageCacheKey.h index 0fb276e9872c..16a5b1d79ecb 100644 --- a/image/ImageCacheKey.h +++ b/image/ImageCacheKey.h @@ -11,6 +11,7 @@ #define mozilla_image_src_ImageCacheKey_h #include "mozilla/Maybe.h" +#include "mozilla/RefPtr.h" class nsIDocument; class nsIURI; diff --git a/image/ImageWrapper.cpp b/image/ImageWrapper.cpp index 63abc8bfbd38..9a485d0a589f 100644 --- a/image/ImageWrapper.cpp +++ b/image/ImageWrapper.cpp @@ -13,6 +13,7 @@ namespace mozilla { using gfx::DataSourceSurface; +using gfx::IntSize; using gfx::SamplingFilter; using gfx::SourceSurface; using layers::LayerManager; diff --git a/image/MultipartImage.cpp b/image/MultipartImage.cpp index 4eb34bf716f3..59aa24aafe76 100644 --- a/image/MultipartImage.cpp +++ b/image/MultipartImage.cpp @@ -8,6 +8,10 @@ #include "imgINotificationObserver.h" namespace mozilla { + +using gfx::IntSize; +using gfx::SourceSurface; + namespace image { /////////////////////////////////////////////////////////////////////////////// diff --git a/image/SurfacePipe.h b/image/SurfacePipe.h index f1c0f696599b..0c0062c17930 100644 --- a/image/SurfacePipe.h +++ b/image/SurfacePipe.h @@ -24,6 +24,8 @@ #include +#include "nsDebug.h" + #include "mozilla/Likely.h" #include "mozilla/Maybe.h" #include "mozilla/Move.h" diff --git a/image/decoders/nsICODecoder.h b/image/decoders/nsICODecoder.h index 97217608aa23..9fd5b4d1f4ad 100644 --- a/image/decoders/nsICODecoder.h +++ b/image/decoders/nsICODecoder.h @@ -13,6 +13,7 @@ #include "nsBMPDecoder.h" #include "nsPNGDecoder.h" #include "ICOFileHeaders.h" +#include "mozilla/gfx/2D.h" namespace mozilla { namespace image { @@ -114,8 +115,8 @@ private: UniquePtr mMaskBuffer; // A temporary buffer for the alpha mask. char mBIHraw[bmp::InfoHeaderLength::WIN_ICO]; // The bitmap information header. IconDirEntry mDirEntry; // The dir entry for the selected resource. - IntSize mBiggestResourceSize; // Used to select the intrinsic size. - IntSize mBiggestResourceHotSpot; // Used to select the intrinsic size. + gfx::IntSize mBiggestResourceSize; // Used to select the intrinsic size. + gfx::IntSize mBiggestResourceHotSpot; // Used to select the intrinsic size. uint16_t mBiggestResourceColorDepth; // Used to select the intrinsic size. int32_t mBestResourceDelta; // Used to select the best resource. uint16_t mBestResourceColorDepth; // Used to select the best resource. diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp index 0c3068af24c0..d8a9646fdaeb 100644 --- a/image/imgFrame.cpp +++ b/image/imgFrame.cpp @@ -12,6 +12,7 @@ #include "gfx2DGlue.h" #include "gfxPlatform.h" +#include "gfxPrefs.h" #include "gfxUtils.h" #include "gfxAlphaRecovery.h"