Telemetry-cluster (https://ct.skia.org/results/cluster-telemetry/tasks/chromium_perf_runs/wangxianzhu-20180321035708/html/index.html) showed about 4% regression of painter_memory_usage and 1.3% regression of paint_op_memory_usage.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1e9c8e2414c49117333d059fb50df596c1cf0ce1 commit 1e9c8e2414c49117333d059fb50df596c1cf0ce1 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Thu Mar 22 18:16:54 2018 [SPv175+] Emit SaveLayerAlphaOp instead of SaveLayerOp for opacity-only effects SaveLayerAlphaOp is smaller than SaveLayerOp because the former stores the alpha value instead of the whole PaintFlags structure. It also corresponds to a fast path in Skia. This also makes the behavior of opacity layer more similar to that of SPv1. Perf result: slight reduction of op_memory_usage (-0.3%) and raterize_time (-0.75%). https://ct.skia.org/results/cluster-telemetry/tasks/chromium_perf_runs/wangxianzhu-20180321190807/html/index.html Bug: 824415 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I7f85aa84f7435686270aac59e782b09bb6a0b7cf Reviewed-on: https://chromium-review.googlesource.com/973808 Commit-Queue: Philip Rogers <pdr@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#545159} [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/cc/paint/display_item_list.h [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/cc/paint/paint_op_buffer.h [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/fast/backgrounds/svg-as-mask-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/fast/dynamic/anonymous-block-layer-lost-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/fast/layers/opacity-stacking-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/fast/sub-pixel/save-layer-bounds-should-snap-expected.html [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/compositing/sibling-positioning-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/clip/nestedTransparencyClip-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/clip/nestedTransparencyClip-expected.txt [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/css/ZeroOpacityLayers-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/css/ZeroOpacityLayers2-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/dynamic/anonymous-block-layer-lost-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/layers/opacity-stacking-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/table/multiple-captions-display-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/table/multiple-captions-display-expected.txt [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/text/complex-text-opacity-expected.png [add] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/fast/text/complex-text-opacity-expected.txt [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/compositing/sibling-positioning-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/fast/clip/nestedTransparencyClip-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/fast/css/ZeroOpacityLayers-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/fast/css/ZeroOpacityLayers2-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/fast/layers/remove-layer-with-nested-stacking-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/composited-with-child-layer-in-next-column-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/fast/table/multiple-captions-display-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/fast/text/complex-text-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/svg/batik/text/textFeatures-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-image-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/transforms/2d/hindi-rotated-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/linux/transforms/transform-on-inline-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/complex-text-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac-mac10.10/transforms/2d/hindi-rotated-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/complex-text-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/as-background-image/svg-as-background-6-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/compositing/sibling-positioning-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/fast/css/ZeroOpacityLayers-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/fast/css/ZeroOpacityLayers2-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/fast/layers/remove-layer-with-nested-stacking-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/fast/table/multiple-captions-display-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/fast/text/complex-text-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-image-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/transforms/2d/hindi-rotated-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/mac/transforms/transform-on-inline-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/compositing/sibling-positioning-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/fast/css/ZeroOpacityLayers-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/fast/css/ZeroOpacityLayers2-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/fast/layers/remove-layer-with-nested-stacking-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/fast/table/multiple-captions-display-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/fast/text/complex-text-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-6-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textFeatures-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-image-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/transforms/2d/hindi-rotated-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win/transforms/transform-on-inline-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/platform/win7/fast/text/complex-text-opacity-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-dom-maskUnits-attr-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-svgdom-maskUnits-prop-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/LayoutTests/svg/foreignObject/clip-expected.png [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp [modify] https://crrev.com/1e9c8e2414c49117333d059fb50df596c1cf0ce1/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayerTest.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a1b4b7f3050a08ed72bf693f57a2b74d52b9a87 commit 9a1b4b7f3050a08ed72bf693f57a2b74d52b9a87 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Sat Apr 14 00:56:49 2018 [SPv175+] Use SkMatrix in CompositedLayerRasterInvalidator::PaintChunkInfo Transforms within a layer should be all 2D. This reduces sizeof(PaintChunInfo) by 88 bytes. Also adjust order of fields to avoid gaps. painter_memory_usage reduce by 25% combined with https://chromium-review.googlesource.com/c/chromium/src/+/1011146: https://ct.skia.org/results/cluster-telemetry/tasks/chromium_perf_runs/wangxianzhu-20180413042756/html/index.html Bug: 824415 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I5e6a3526b077d5306ab0776782e467c98ba1d91f Reviewed-on: https://chromium-review.googlesource.com/1011826 Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: Tien-Ren Chen <trchen@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#550841} [modify] https://crrev.com/9a1b4b7f3050a08ed72bf693f57a2b74d52b9a87/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator.h [modify] https://crrev.com/9a1b4b7f3050a08ed72bf693f57a2b74d52b9a87/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/efa7de1feb174db62052e5bf1c2017df6d149741 commit efa7de1feb174db62052e5bf1c2017df6d149741 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Thu Apr 19 03:49:50 2018 [SPv175+] Separate raster invalidation vectors out of PaintChunk Raster invalidation vectors are used transiently (after paint and before chunk raster invalidation). With them in PaintChunk, they still use 32 bytes (LP64) in each PaintChunk after they are cleared. Separate them out into PaintChunksData. Add PaintController::FinishCycle() to cleanup data that won't be used in the next cycle. Bug: 824415 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I8462c9df7fb32ecae2226f9f05b355f21194233f Reviewed-on: https://chromium-review.googlesource.com/1011146 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#551938} [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/core/frame/local_frame_view.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator_test.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/compositing/content_layer_client_impl.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/compositing/content_layer_client_impl.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/graphics_layer.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_artifact.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_artifact.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_chunk.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_chunk.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_chunker.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_chunker.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_chunker_test.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_controller.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_controller.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_controller_test.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/paint_controller_test.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/graphics/paint/raster_invalidation_tracking.h [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/testing/test_paint_artifact.cc [modify] https://crrev.com/efa7de1feb174db62052e5bf1c2017df6d149741/third_party/blink/renderer/platform/testing/test_paint_artifact.h
Now both paint_op_memory_usage and painter_memory_usage are lower than SPv1: https://ct.skia.org/results/cluster-telemetry/tasks/chromium_perf_runs/wangxianzhu-20180428042757/html/index.html
Comment 1 by bugdroid1@chromium.org
, Mar 22 2018