mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1378375 - Kill switch preference for image network request prioritization according layout position. r=tnikkel
This commit is contained in:
parent
c7e8c24f9f
commit
8f8eed7be6
@ -501,6 +501,7 @@ private:
|
||||
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.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(Live, "image.mem.discardable", ImageMemDiscardable, bool, false);
|
||||
DECL_GFX_PREF(Once, "image.mem.animated.discardable", ImageMemAnimatedDiscardable, bool, false);
|
||||
|
@ -558,6 +558,10 @@ imgRequest::AdjustPriorityInternal(int32_t aDelta)
|
||||
void
|
||||
imgRequest::BoostPriority(uint32_t aCategory)
|
||||
{
|
||||
if (!gfxPrefs::ImageLayoutNetworkPriority()) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t newRequestedCategory =
|
||||
(mBoostCategoriesRequested & aCategory) ^ aCategory;
|
||||
if (!newRequestedCategory) {
|
||||
|
@ -4604,6 +4604,10 @@ pref("image.http.accept", "*/*");
|
||||
// disable.
|
||||
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
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user