cc: Reduce DrawImage copies throughout tile management

Desktop / Chromium - Vladimir Levin [chromium.org] - 17 August 2017 18:22 EDT

This patch removes a bunch of unnecessary DrawImage copies in tile management:- Updates RTree to optionally get non-owning pointers to payload- Removes Apply* functionality from DrawImages- Merges some scale/color space adjustments to a single loop
- Extra various fixes.

Overall, with heavy image pages, this improves prepare tiles performance by about 17%.

(results below are from z620 with nice -20)

Also, I've updated the perftest to have images, and the results before the patch are:
*RESULT prepare_tiles: 2_100= 234.7359161376953 runs/s
*RESULT prepare_tiles: 2_500= 2114.67529296875 runs/s
*RESULT prepare_tiles: 2_1000= 2211.875732421875 runs/s
*RESULT prepare_tiles: 10_100= 2542.89697265625 runs/s
*RESULT prepare_tiles: 10_500= 2274.846435546875 runs/s
*RESULT prepare_tiles: 10_1000= 1873.749267578125 runs/s
*RESULT prepare_tiles: 50_100= 1864.05029296875 runs/s
*RESULT prepare_tiles: 50_500= 1605.9761962890625 runs/s
*RESULT prepare_tiles: 50_1000= 1449.952880859375 runs/s

And after the patch:
*RESULT prepare_tiles: 2_100= 268.3415222167969 runs/s (+14%)
*RESULT prepare_tiles: 2_500= 2392.8046875 runs/s (+13%)
*RESULT prepare_tiles: 2_1000= 2339.514892578125 runs/s (+6%)
*RESULT prepare_tiles: 10_100= 2973.19677734375 runs/s (+17%)
*RESULT prepare_tiles: 10_500= 2737.3037109375 runs/s (+20%)
*RESULT prepare_tiles: 10_1000= 2415.32763671875 runs/s (+29%)
*RESULT prepare_tiles: 50_100= 2213.66748046875 runs/s (+19%)
*RESULT prepare_tiles: 50_500= 1867.39306640625 runs/s (+16%)
*RESULT prepare_tiles: 50_1000= 1826.7164306640625 runs/s (+26%)

R=enne@chromium.org, khushalsagar@chromium.org

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: I13876a292d56aa61244f1e618d4c02bcbc89c86b Reviewed-on: https://chromium-review.googlesource.com/617400 Commit-Queue: Vladimir Levin

0d3adcd cc: Reduce DrawImage copies throughout tile management.
cc/base/rtree.h | 40 +++++++-
cc/layers/recording_source_unittest.cc | 153 +++++++++++++++--------------
cc/paint/discardable_image_map.cc | 21 +---
cc/paint/discardable_image_map.h | 4 +-
cc/paint/discardable_image_map_unittest.cc | 48 +++++----
cc/paint/draw_image.cc | 21 +++-
cc/paint/draw_image.h | 28 +++---
cc/raster/playback_image_provider.cc | 3 +-
cc/raster/raster_source.cc | 8 +-
cc/raster/raster_source.h | 7 +-
cc/raster/raster_source_unittest.cc | 41 ++++----
cc/test/fake_raster_source.cc | 16 +++
cc/test/fake_raster_source.h | 2 +
cc/tiles/checker_image_tracker_unittest.cc | 2 +-
cc/tiles/image_controller.cc | 6 +-
cc/tiles/tile_manager.cc | 27 ++---
cc/tiles/tile_manager_perftest.cc | 6 +-
17 files changed, 235 insertions(+), 198 deletions(-)

Upstream: git.chromium.org


  • Share