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
--- 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