mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-01-12 20:30:18 +00:00
#501: add toggle pref
This commit is contained in:
parent
630d191905
commit
ac0300a558
@ -295,6 +295,7 @@ private:
|
||||
DECL_GFX_PREF(Live, "image.mozsamplesize.enabled", ImageMozSampleSizeEnabled, bool, false);
|
||||
DECL_GFX_PREF(Once, "image.multithreaded_decoding.limit", ImageMTDecodingLimit, int32_t, -1);
|
||||
DECL_GFX_PREF(Live, "image.single-color-optimization.enabled", ImageSingleColorOptimizationEnabled, bool, true);
|
||||
DECL_GFX_PREF(Live, "image.webp.enabled", ImageWebPEnabled, bool, false);
|
||||
|
||||
DECL_GFX_PREF(Once, "layers.acceleration.disabled", LayersAccelerationDisabled, bool, false);
|
||||
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps", LayersDrawFPS, bool, false);
|
||||
|
@ -65,7 +65,8 @@ DecoderFactory::GetDecoderType(const char* aMimeType)
|
||||
type = DecoderType::ICON;
|
||||
|
||||
// WEBP
|
||||
} else if (!strcmp(aMimeType, IMAGE_WEBP)) {
|
||||
} else if (!strcmp(aMimeType, IMAGE_WEBP) &&
|
||||
MOZ_LIKELY(gfxPrefs::ImageWebPEnabled())) {
|
||||
type = DecoderType::WEBP;
|
||||
}
|
||||
|
||||
@ -161,7 +162,8 @@ DecoderFactory::CreateAnimationDecoder(DecoderType aType,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(aType == DecoderType::GIF || aType == DecoderType::PNG,
|
||||
MOZ_ASSERT(aType == DecoderType::GIF || aType == DecoderType::PNG ||
|
||||
aType == DecoderType::WEBP,
|
||||
"Calling CreateAnimationDecoder for non-animating DecoderType");
|
||||
|
||||
RefPtr<Decoder> decoder =
|
||||
|
@ -4193,6 +4193,9 @@ pref("image.mem.surfacecache.discard_factor", 1);
|
||||
// automatically determined based on the system's number of cores.
|
||||
pref("image.multithreaded_decoding.limit", -1);
|
||||
|
||||
// Whether we attempt to decode WebP images or not.
|
||||
pref("image.webp.enabled", true);
|
||||
|
||||
// Limit for the canvas image cache. 0 means we don't limit the size of the
|
||||
// cache.
|
||||
pref("canvas.image.cache.limit", 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user