Bug 1300543 - IconRequestExecutor: Resize image before extracting color. r=ahunt
authorSebastian Kaspari <s.kaspari@gmail.com>
Mon, 05 Sep 2016 15:25:25 +0200
changeset 354147 2269f770b2e7a2d103077ca1ada9af1785b648b2
parent 354146 dd2d29dbd7c5ac4af4540ca679658c0b1568ee7f
child 354148 c5f01980a16a9cd6662868714c03228622bef2fa
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt
bugs1300543
milestone51.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 1300543 - IconRequestExecutor: Resize image before extracting color. r=ahunt Running the color extraction algorithm on a smaller image will be much faster. MozReview-Commit-ID: A42rzuQ3FDQ
mobile/android/base/java/org/mozilla/gecko/icons/IconRequestExecutor.java
--- a/mobile/android/base/java/org/mozilla/gecko/icons/IconRequestExecutor.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/IconRequestExecutor.java
@@ -101,25 +101,25 @@ import java.util.concurrent.TimeUnit;
             // Download the icon from the web.
             new IconDownloader()
     );
 
     /**
      * Ordered list of processors that run after an icon has been loaded.
      */
     private static final List<Processor> PROCESSORS = Arrays.asList(
-            // Extract the dominant color from the icon
-            new ColorProcessor(),
-
             // Store the icon (and mapping) in the disk cache if needed
             new DiskProcessor(),
 
             // Resize the icon to match the target size (if possible)
             new ResizingProcessor(),
 
+            // Extract the dominant color from the icon
+            new ColorProcessor(),
+
             // Store the icon in the memory cache
             new MemoryProcessor()
     );
 
     private static final ExecutorService EXECUTOR;
     static {
         final ThreadFactory factory = new ThreadFactory() {
             @Override