Bug 1060869 (Part 4) - Update SurfaceCache prefs to increase the cache size. r=dholbert,tn

--HG--
extra : rebase_source : 64746ba9ac1dab008857aa5acbe8699b2de69f0b
This commit is contained in:
Seth Fowler 2014-11-25 00:10:11 -08:00
Родитель 54a6933009
Коммит ab431799e2
6 изменённых файлов: 27 добавлений и 13 удалений

Просмотреть файл

@ -330,9 +330,22 @@ pref("media.video-queue.default-size", 3);
pref("image.mem.decodeondraw", true);
pref("image.mem.allow_locking_in_content_processes", false); /* don't allow image locking */
pref("image.mem.min_discard_timeout_ms", 86400000); /* 24h, we rely on the out of memory hook */
pref("image.mem.max_decoded_image_kb", 30000); /* 30MB seems reasonable */
// 65MB seems reasonable and layout/reftests/bugs/370629-1.html requires more than 62MB
pref("image.mem.hard_limit_decoded_image_kb", 66560);
// At this point 'max_decoded_image_kb' only applies to animated images. They're
// unfortunately fairly large, so this pref still needs to be somewhat generous,
// but it makes sense to reduce it since most types of images are now in the
// surface cache. Once animated images are stored in the surface cache too, this
// pref will go away; see bug 977459. The same goes for
// 'hard_limit_decoded_image_kb'; the surface cache limits are all hard.
pref("image.mem.max_decoded_image_kb", 16384); // 16MB
pref("image.mem.hard_limit_decoded_image_kb", 16384); // 16MB
// Limit the surface cache to 1/8 of main memory or 128MB, whichever is smaller.
// Almost everything that was factored into 'max_decoded_image_kb' is now stored
// in the surface cache. 1/8 of main memory is 32MB on a 256MB device, which is
// about the same as the old 'max_decoded_image_kb'.
pref("image.mem.surfacecache.max_size_kb", 131072); // 128MB
pref("image.mem.surfacecache.size_factor", 8); // 1/8 of main memory
pref("image.mem.surfacecache.discard_factor", 2); // Discard 1/2 of the surface cache at a time.
pref("image.mem.surfacecache.min_expiration_ms", 86400000); // 24h, we rely on the out of memory hook
pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eagerly */
// XXX this isn't a good check for "are touch events supported", but

Просмотреть файл

@ -39,7 +39,7 @@ skip-if(Android||B2G) == 649134-2.html 649134-2-ref.html
# (Fuzzy necessary due to pixel-wise comparison of different JPEGs.
# The vast majority of the fuzziness comes from Linux and WinXP.)
fuzzy(1,149) == bug917595-iframe-1.html bug917595-1-ref.html
fuzzy(3,640) == bug917595-exif-rotated.jpg bug917595-pixel-rotated.jpg
skip-if(B2G) fuzzy-if(!B2G,3,640) == bug917595-exif-rotated.jpg bug917595-pixel-rotated.jpg # bug 1060869
== href-attr-change-restyles.html href-attr-change-restyles-ref.html
== figure.html figure-ref.html

Просмотреть файл

@ -47,4 +47,5 @@ skip-if = true # bug 1100497
[test_svg_filter_animation.html]
[test_synchronized_animation.html]
[test_undisplayed_iframe.html]
skip-if = true # bug 1060869
[test_xultree_animation.xhtml]

Просмотреть файл

@ -93,4 +93,5 @@ skip-if = toolkit == "gonk" #Bug 997034 - canvas.toDataURL() often causes lost c
[test_error_events.html]
[test_short_gif_header.html]
[test_image_buffer_limit.html]
run-if = toolkit == "gonk" #Image buffer limit is only set for Firefox OS currently.
#run-if = toolkit == "gonk" #Image buffer limit is only set for Firefox OS currently.
skip-if = true # bug 1060869

Просмотреть файл

@ -637,7 +637,7 @@ skip-if(B2G&&browserIsRemote) == 369882.xul 369882-ref.xul # bug 974780
== 370525-rowspan-4.html 370525-rowspan-4-ref.html
== 370525-sib.html 370525-sib-ref.html
== 370586-1.xhtml 370586-1-ref.xhtml
== 370629-1.html 370629-1-ref.html
skip-if(B2G) == 370629-1.html 370629-1-ref.html # bug 1060869
skip-if(B2G) == 370629-2.html 370629-2-ref.html
== 370692-1.xhtml 370692-1-ref.xhtml
== 371041-1.html 371041-1-ref.html
@ -1844,4 +1844,4 @@ test-pref(dom.webcomponents.enabled,true) == 1066554-1.html 1066554-1-ref.html
== 1078262-1.html about:blank
test-pref(layout.testing.overlay-scrollbars.always-visible,false) == 1081072-1.html 1081072-1-ref.html
fuzzy-if(winWidget&&!layersGPUAccelerated,1,31) == 1081185-1.html 1081185-1-ref.html
== 1097437-1.html 1097437-1-ref.html
== 1097437-1.html 1097437-1-ref.html

Просмотреть файл

@ -3799,14 +3799,13 @@ pref("image.mem.hard_limit_decoded_image_kb", 0);
pref("image.mem.surfacecache.min_expiration_ms", 60000); // 60ms
// Maximum size for the surface cache, in kilobytes.
pref("image.mem.surfacecache.max_size_kb", 102400); // 100MB
pref("image.mem.surfacecache.max_size_kb", 1048576); // 1GB
// The surface cache's size, within the constraints of the maximum size set
// above, is determined using a formula based on system capabilities like memory
// size. The size factor is used to tune this formula. Larger size factors
// result in smaller caches. The default should be a good balance for most
// systems.
pref("image.mem.surfacecache.size_factor", 64);
// above, is determined as a fraction of main memory size. The size factor is
// interpreted as a reciprocal, so a size factor of 4 means to use no more than
// 1/4 of main memory. The default should be a good balance for most systems.
pref("image.mem.surfacecache.size_factor", 4);
// How much of the data in the surface cache is discarded when we get a memory
// pressure notification, as a fraction. The discard factor is interpreted as a