From e223c546c92b2a594f9a8e348ed76eb3eaf277e9 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Mon, 18 Nov 2013 22:03:36 -0800 Subject: [PATCH] Bug 940226 - Build image/src in unified mode. r=seth --- image/src/ImageMetadata.h | 5 +++++ image/src/SVGDocumentWrapper.cpp | 3 +++ image/src/SVGDocumentWrapper.h | 2 ++ image/src/VectorImage.cpp | 3 +++ image/src/moz.build | 16 ++++++++++------ 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/image/src/ImageMetadata.h b/image/src/ImageMetadata.h index 5ec74a3e209b..3c32ef66a3a3 100644 --- a/image/src/ImageMetadata.h +++ b/image/src/ImageMetadata.h @@ -4,6 +4,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef ImageMetadata_h___ +#define ImageMetadata_h___ + #include #include "mozilla/Maybe.h" #include "nsSize.h" @@ -72,3 +75,5 @@ private: } // namespace image } // namespace mozilla + +#endif // ImageMetadata_h___ diff --git a/image/src/SVGDocumentWrapper.cpp b/image/src/SVGDocumentWrapper.cpp index 15984bae188d..3fcd869d7bde 100644 --- a/image/src/SVGDocumentWrapper.cpp +++ b/image/src/SVGDocumentWrapper.cpp @@ -28,6 +28,9 @@ #include "mozilla/dom/SVGAnimatedLength.h" #include "nsMimeTypes.h" +// undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK +#undef GetCurrentTime + using namespace mozilla::dom; namespace mozilla { diff --git a/image/src/SVGDocumentWrapper.h b/image/src/SVGDocumentWrapper.h index 9b4cc9c02ac2..d70a0241f440 100644 --- a/image/src/SVGDocumentWrapper.h +++ b/image/src/SVGDocumentWrapper.h @@ -25,6 +25,8 @@ struct nsIntSize; #define OBSERVER_SVC_CID "@mozilla.org/observer-service;1" +// undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK +#undef GetCurrentTime namespace mozilla { namespace dom { diff --git a/image/src/VectorImage.cpp b/image/src/VectorImage.cpp index 4526f10fbd63..e99c7a1f4fc3 100644 --- a/image/src/VectorImage.cpp +++ b/image/src/VectorImage.cpp @@ -26,6 +26,9 @@ #include "nsIDOMEventListener.h" #include "SurfaceCache.h" +// undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK +#undef GetCurrentTime + namespace mozilla { using namespace dom; diff --git a/image/src/moz.build b/image/src/moz.build index 11573ec861f3..7fc8d0559cf1 100644 --- a/image/src/moz.build +++ b/image/src/moz.build @@ -12,7 +12,7 @@ EXPORTS += [ 'Orientation.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ClippedImage.cpp', 'Decoder.cpp', 'DiscardTracker.cpp', @@ -26,19 +26,23 @@ SOURCES += [ 'ImageOps.cpp', 'ImageWrapper.cpp', 'imgFrame.cpp', - 'imgLoader.cpp', - 'imgRequest.cpp', - 'imgRequestProxy.cpp', - 'imgStatusTracker.cpp', 'imgTools.cpp', 'OrientedImage.cpp', - 'RasterImage.cpp', 'ScriptedNotificationObserver.cpp', 'SurfaceCache.cpp', 'SVGDocumentWrapper.cpp', 'VectorImage.cpp', ] +# These files can't be unified because of ImageLogging.h #include order issues. +SOURCES += [ + 'imgLoader.cpp', + 'imgRequest.cpp', + 'imgRequestProxy.cpp', + 'imgStatusTracker.cpp', + 'RasterImage.cpp', +] + FAIL_ON_WARNINGS = True include('/ipc/chromium/chromium-config.mozbuild')