[RasterInvalidation] Use HashMap to index out-of-order old display items
Previously we always sequentially matched old and new display items. The algorithm was efficient for sequential matching, but was O(n^2) in the worst case that the new chunk reversed the order of display items of the old chunk. Now add an index for matching out-of-order old display items. Sequential match is done only in a single pass. It's the same method that we are using in PaintController. When display item raster invalidation was in PaintController, we also used the same index for raster invalidation. Bug: 859940 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I86ee7f4a324f710daaad03f29d00b17db0f11cb7 Reviewed-on: https://chromium-review.googlesource.com/1125300Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#572418}
Showing
Please register or sign in to comment