зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1378375 - Kill switch preference for image network request prioritization according layout position. r=tnikkel
This commit is contained in:
Родитель
c7e8c24f9f
Коммит
8f8eed7be6
|
@ -501,6 +501,7 @@ private:
|
||||||
DECL_GFX_PREF(Live, "image.decode-immediately.enabled", ImageDecodeImmediatelyEnabled, bool, false);
|
DECL_GFX_PREF(Live, "image.decode-immediately.enabled", ImageDecodeImmediatelyEnabled, bool, false);
|
||||||
DECL_GFX_PREF(Live, "image.downscale-during-decode.enabled", ImageDownscaleDuringDecodeEnabled, bool, true);
|
DECL_GFX_PREF(Live, "image.downscale-during-decode.enabled", ImageDownscaleDuringDecodeEnabled, bool, true);
|
||||||
DECL_GFX_PREF(Live, "image.infer-src-animation.threshold-ms", ImageInferSrcAnimationThresholdMS, uint32_t, 2000);
|
DECL_GFX_PREF(Live, "image.infer-src-animation.threshold-ms", ImageInferSrcAnimationThresholdMS, uint32_t, 2000);
|
||||||
|
DECL_GFX_PREF(Live, "image.layout_network_priority", ImageLayoutNetworkPriority, bool, true);
|
||||||
DECL_GFX_PREF(Once, "image.mem.decode_bytes_at_a_time", ImageMemDecodeBytesAtATime, uint32_t, 200000);
|
DECL_GFX_PREF(Once, "image.mem.decode_bytes_at_a_time", ImageMemDecodeBytesAtATime, uint32_t, 200000);
|
||||||
DECL_GFX_PREF(Live, "image.mem.discardable", ImageMemDiscardable, bool, false);
|
DECL_GFX_PREF(Live, "image.mem.discardable", ImageMemDiscardable, bool, false);
|
||||||
DECL_GFX_PREF(Once, "image.mem.animated.discardable", ImageMemAnimatedDiscardable, bool, false);
|
DECL_GFX_PREF(Once, "image.mem.animated.discardable", ImageMemAnimatedDiscardable, bool, false);
|
||||||
|
|
|
@ -558,6 +558,10 @@ imgRequest::AdjustPriorityInternal(int32_t aDelta)
|
||||||
void
|
void
|
||||||
imgRequest::BoostPriority(uint32_t aCategory)
|
imgRequest::BoostPriority(uint32_t aCategory)
|
||||||
{
|
{
|
||||||
|
if (!gfxPrefs::ImageLayoutNetworkPriority()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t newRequestedCategory =
|
uint32_t newRequestedCategory =
|
||||||
(mBoostCategoriesRequested & aCategory) ^ aCategory;
|
(mBoostCategoriesRequested & aCategory) ^ aCategory;
|
||||||
if (!newRequestedCategory) {
|
if (!newRequestedCategory) {
|
||||||
|
|
|
@ -4604,6 +4604,10 @@ pref("image.http.accept", "*/*");
|
||||||
// disable.
|
// disable.
|
||||||
pref("image.infer-src-animation.threshold-ms", 2000);
|
pref("image.infer-src-animation.threshold-ms", 2000);
|
||||||
|
|
||||||
|
// Whether the network request priority should be adjusted according
|
||||||
|
// the layout and view frame position of each particular image.
|
||||||
|
pref("image.layout_network_priority", true);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Image memory management prefs
|
// Image memory management prefs
|
||||||
//
|
//
|
||||||
|
|
Загрузка…
Ссылка в новой задаче