зеркало из https://github.com/mozilla/gecko-dev.git
Bug 523950 - Part 3. Add preferences to control animated image decoding behaviour. r=tnikkel
image.animated.decode-on-demand.threshold-kb is the maximum size in kB that the aggregate frames of an animation can use before it starts to discard already displayed frames, and redecode them as necessary. The lower it is set to, the less overall memory we will consume at the expense of execution time for as long as the tab with the animation(s) above the threshold are kept open. image.animated.decode-on-demand.batch-size is the minimum number of frames we want to have buffered ahead of an animation's currently displayed frame. The decoding will request this number of frames at a time to maximize use of memory caching. Note that this is related to the above preference as well; increasing the batch size will in effect raise what the minimum threshold. This simplifies the logic in patches later in the series.
This commit is contained in:
Родитель
28978c4f66
Коммит
2088409e88
|
@ -521,6 +521,8 @@ private:
|
|||
DECL_GFX_PREF(Live, "gl.require-hardware", RequireHardwareGL, bool, false);
|
||||
DECL_GFX_PREF(Live, "gl.use-tls-is-current", UseTLSIsCurrent, int32_t, 0);
|
||||
|
||||
DECL_GFX_PREF(Live, "image.animated.decode-on-demand.threshold-kb", ImageAnimatedDecodeOnDemandThresholdKB, uint32_t, 20480);
|
||||
DECL_GFX_PREF(Live, "image.animated.decode-on-demand.batch-size", ImageAnimatedDecodeOnDemandBatchSize, uint32_t, 6);
|
||||
DECL_GFX_PREF(Live, "image.cache.factor2.threshold-surfaces", ImageCacheFactor2ThresholdSurfaces, int32_t, -1);
|
||||
DECL_GFX_PREF(Once, "image.cache.size", ImageCacheSize, int32_t, 5*1024*1024);
|
||||
DECL_GFX_PREF(Once, "image.cache.timeweight", ImageCacheTimeWeight, int32_t, 500);
|
||||
|
|
|
@ -4693,6 +4693,15 @@ pref("toolkit.zoomManager.zoomValues", ".3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2
|
|||
// Image-related prefs
|
||||
//
|
||||
|
||||
// The maximum size (in kB) that the aggregate frames of an animation can use
|
||||
// before it starts to discard already displayed frames and redecode them as
|
||||
// necessary.
|
||||
pref("image.animated.decode-on-demand.threshold-kb", 20480);
|
||||
|
||||
// The minimum number of frames we want to have buffered ahead of an
|
||||
// animation's currently displayed frame.
|
||||
pref("image.animated.decode-on-demand.batch-size", 6);
|
||||
|
||||
// Maximum number of surfaces for an image before entering "factor of 2" mode.
|
||||
// This in addition to the number of "native" sizes of an image. A native size
|
||||
// is a size for which we can decode a frame without up or downscaling. Most
|
||||
|
|
Загрузка…
Ссылка в новой задаче