Skip to content

Commit

Permalink
Bug 1177323 - disable decode-only-on-draw preference. r=seth
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessar committed Jul 7, 2015
1 parent 6139fc4 commit 2cde78e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gfx/thebes/gfxPrefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class gfxPrefs final

DECL_GFX_PREF(Once, "image.cache.size", ImageCacheSize, int32_t, 5*1024*1024);
DECL_GFX_PREF(Once, "image.cache.timeweight", ImageCacheTimeWeight, int32_t, 500);
DECL_GFX_PREF(Live, "image.decode-only-on-draw.enabled", ImageDecodeOnlyOnDrawEnabled, bool, true);
DECL_GFX_PREF(Live, "image.decode-only-on-draw.enabled", ImageDecodeOnlyOnDrawEnabled, bool, false);
DECL_GFX_PREF(Live, "image.decode-immediately.enabled", ImageDecodeImmediatelyEnabled, bool, false);
DECL_GFX_PREF(Once, "image.decode.retry-on-alloc-failure", ImageDecodeRetryOnAllocFailure, bool, false);
DECL_GFX_PREF(Live, "image.downscale-during-decode.enabled", ImageDownscaleDuringDecodeEnabled, bool, true);
Expand Down
5 changes: 2 additions & 3 deletions image/ImageFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ ComputeImageFlags(ImageURL* uri, const nsCString& aMimeType, bool isMultiPart)
bool doDownscaleDuringDecode = gfxPrefs::ImageDownscaleDuringDecodeEnabled();

// We use the platform APZ value here since we don't have a widget to test.
// It's safe since this is an optimization, and the only platform
// ImageDecodeOnlyOnDraw is disabled on is B2G (where APZ is enabled in all
// widgets anyway).
// It's safe since this is an optimization, and
// ImageDecodeOnlyOnDraw is disabled everywhere and will be removed soon.
bool doDecodeOnlyOnDraw = gfxPrefs::ImageDecodeOnlyOnDrawEnabled() &&
gfxPlatform::AsyncPanZoomEnabled();

Expand Down
2 changes: 1 addition & 1 deletion mobile/android/app/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ pref("media.mediasource.enabled", true);

// optimize images memory usage
pref("image.downscale-during-decode.enabled", true);
pref("image.decode-only-on-draw.enabled", true);
pref("image.decode-only-on-draw.enabled", false);

#ifdef NIGHTLY_BUILD
// Shumway component (SWF player) is disabled by default. Also see bug 904346.
Expand Down
2 changes: 1 addition & 1 deletion modules/libpref/init/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -4028,7 +4028,7 @@ pref("image.cache.timeweight", 500);

// Prevents images from automatically being decoded on load, instead allowing
// them to be decoded on demand when they are drawn.
pref("image.decode-only-on-draw.enabled", true);
pref("image.decode-only-on-draw.enabled", false);

// Decode all images automatically on load, ignoring our normal heuristics.
// Overrides image.decode-only-on-draw.enabled.
Expand Down

0 comments on commit 2cde78e

Please sign in to comment.