Bug 943686 - Add imageLoader.cpp to unified sources. r=tn
authorEric Rahm <erahm@mozilla.com>
Tue, 21 Mar 2017 11:09:13 -0700
changeset 348643 a7f4eebaf86b386a5e940c081c9c85cd2ce4452a
parent 348642 30c3b52e7892162fc072b18ac34383d914286d41
child 348644 050ac6eabd673c2151d7f00dcbd3bc7eef576dbf
push id88285
push usererahm@mozilla.com
push dateTue, 21 Mar 2017 18:09:25 +0000
treeherdermozilla-inbound@17d0a9fdad9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs943686
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 943686 - Add imageLoader.cpp to unified sources. r=tn MozReview-Commit-ID: G9sFOtbFYjP
image/imgLoader.cpp
image/moz.build
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -1,14 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+// Undefine windows version of LoadImage because our code uses that name.
+#undef LoadImage
+
 #include "ImageLogging.h"
 #include "imgLoader.h"
 
 #include "mozilla/Attributes.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/Move.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ChaosMode.h"
@@ -123,17 +126,17 @@ public:
            !iter.Done();
            iter.Next()) {
         imgCacheEntry* entry = iter.UserData();
         if (entry->HasNoProxies()) {
           continue;
         }
 
         RefPtr<imgRequest> req = entry->GetRequest();
-        RefPtr<Image> image = req->GetImage();
+        RefPtr<image::Image> image = req->GetImage();
         if (!image) {
           continue;
         }
 
         // Both this and EntryImageSizes measure images/content/raster/used/decoded
         // memory.  This function's measurement is secondary -- the result doesn't
         // go in the "explicit" tree -- so we use moz_malloc_size_of instead of
         // ImagesMallocSizeOf to prevent DMD from seeing it reported twice.
@@ -396,17 +399,17 @@ private:
     aHandleReport->Callback(EmptyCString(), path, aKind, UNITS_BYTES,
                             aValue, desc, aData);
   }
 
   static void RecordCounterForRequest(imgRequest* aRequest,
                                       nsTArray<ImageMemoryCounter>* aArray,
                                       bool aIsUsed)
   {
-    RefPtr<Image> image = aRequest->GetImage();
+    RefPtr<image::Image> image = aRequest->GetImage();
     if (!image) {
       return;
     }
 
     ImageMemoryCounter counter(image, ImagesMallocSizeOf, aIsUsed);
 
     aArray->AppendElement(Move(counter));
   }
--- a/image/moz.build
+++ b/image/moz.build
@@ -61,16 +61,17 @@ UNIFIED_SOURCES += [
     'FrozenImage.cpp',
     'IDecodingTask.cpp',
     'Image.cpp',
     'ImageCacheKey.cpp',
     'ImageFactory.cpp',
     'ImageOps.cpp',
     'ImageWrapper.cpp',
     'imgFrame.cpp',
+    'imgLoader.cpp',
     'imgTools.cpp',
     'MultipartImage.cpp',
     'OrientedImage.cpp',
     'ScriptedNotificationObserver.cpp',
     'ShutdownTracker.cpp',
     'SourceBuffer.cpp',
     'SurfaceCache.cpp',
     'SurfaceCacheUtils.cpp',
@@ -78,17 +79,16 @@ UNIFIED_SOURCES += [
     'SVGDocumentWrapper.cpp',
     'VectorImage.cpp',
 ]
 if CONFIG['MOZ_ENABLE_SKIA']:
     UNIFIED_SOURCES += [ 'Downscaler.cpp']
 
 # These files can't be unified because of ImageLogging.h #include order issues.
 SOURCES += [
-    'imgLoader.cpp',
     'imgRequest.cpp',
     'imgRequestProxy.cpp',
     'ProgressTracker.cpp',
     'RasterImage.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')