This CL attempts to improve upon the default loading priorities for images. By default, images will start at ResourceLoadPriorityVeryLow and after a layout or during a scroll, anything that's visible will be promoted up to ResourceLoadPriorityLow.

In our tests, this was a really nice win on speed-index, with a gain of ~5% on average, at ~14% at the 99th percentile.

This was committed as r163110, but rolled back due to performance regressions (https://code.google.com/p/chromium/issues/detail?id=326165) in r163362. Link to previous review: https://codereview.chromium.org/86533002/

From profiling the code, the regression is almost completely from the extra time spent in RenderBox::absoluteContentBox called from RenderBlock::updateStyleImageLoadingPriorities. Refactored the code to early out before calling that.


Results of performance tests:

Format:
1st line: Original CL          <-- Regression
2nd line: Original CL Disabled <-- This should be target performance
3rd line: This CL              <-- Hopefully roughly the same as (2)

Pages: [floats_50_100.html]
1. Avg floats_50_100: 229.050280ms
2. Avg floats_50_100: 187.935380ms
3. Avg floats_50_100: 190.970400ms


Pages: [fixed-grid-lots-of-data.html]
1. Avg fixed-grid-lots-of-data: 727.259726runs/s
2. Avg fixed-grid-lots-of-data: 1404.643989runs/s
3. Avg fixed-grid-lots-of-data: 1419.710566runs/s


Pages: [ChangingClassNameShadowDOM.html]
1. Avg ChangingClassNameShadowDOM: 71.947800ms
2. Avg ChangingClassNameShadowDOM: 61.533920ms
3. Avg ChangingClassNameShadowDOM: 61.871240ms


page_sets/typical_25.json
1. Avg warm_times: 685.391111ms
2. Avg warm_times: 644.857778ms
3. Avg warm_times: 649.995556ms


http___ynet.co.il_
1. Avg warm_times: 753.111111ms
2. Avg warm_times: 677.000000ms
3. Avg warm_times: 654.666667ms


page_sets/intl_es_fr_pt-BR.json
1. Avg warm_times: 406.922222ms
2. Avg warm_times: 397.788889ms
3. Avg warm_times: 399.477778ms


robohornet_pro
1. *RESULT Total: Total= 5041 ms
2. *RESULT Total: Total= 3692 ms
3. *RESULT Total: Total= 3514 ms



BUG=319073, 326165, 326483

Review URL: https://codereview.chromium.org/109153003

git-svn-id: svn://svn.chromium.org/blink/trunk@163563 bbb929c8-8fbe-4397-9dbb-9b2b20218538