Investigate performance problems for 'Animometer Score > Focus' benchmark |
||||||||||
Issue descriptionAll benchmarks are under pr.gg/animometer/developer.html - Set "Ramp" mode for benchmarking. - Set "Keep at a fixed complexity" for profiling. Set an appropriate [high] complexity next to each test's name. File any performance bugs found as blocking this issue.
,
May 4 2016
Note: this test is tracked in Telemetry under "smoothness.tough_filters_cases", with a fixed complexity of 100. Its URL begins with http://rawgit.com/WebKit/webkit/master/PerformanceTests/Animometer/developer.html.
,
May 4 2016
In order to set an upper bound on optimizations, here are some timings with various rendering paths disabled (on Z620 Linux/NV, 20 sec run, target 50FPS) drawing nothing (early-out in cc when filter present) 68.98 drawing unfiltered (skip filter in cc) 67.35 drawing nothing (early-out in skia) 47.49 drawing unfiltered (skip blur + opacity in Skia) 45.5 drawing unblurred (skip SkBlurImageFilter in Skia) 42.75 ToT 24.99
,
May 4 2016
,
May 4 2016
FYI - here's my prototype patch for skipping render pass quads in the case where we are filtering a single tile in CC: crrev.com/1887483002 - not production ready, but might be good for benchmarking.
,
May 5 2016
Re: #5: awesome! That sounds like crbug.com/254639 , which I'll make a blocker for this.
,
May 5 2016
The GPU blur algorithm involves a lot of FBO passes. I've put together some diagrams to describe the most common cases here: https://docs.google.com/document/d/1BAfL9PK9hk8-tg4TzGSwdHpfyamAiTIG5TwbPU3igOs/edit?usp=sharing Eliminating some of these blit passes is probably the lowest-hanging fruit in the short- to medium-term (such as #5 above, as well as the restore pass). In the long term, there may be a possibility to combine working from separate passes for multiple primitives, via a combination of - slimming paint (to create fewer layers) - skia saveLayer hoisting to reduce FBO switching - texture atlasing to combine multiple primitives into a single FBO - batching of blur passes - e.g., multiple primitives are downsampled in a single pass, convolved in a single pass, etc That's a lot of dependencies to get to the optimal end state, but we may be able to make successive wins along the way (e.g., saveLayer hoisting). Finally, GPU compute may allow us to speed up the convolution passes, by using a more GPU-friendly algorithm than straight convolution. That will require support for GPU compute in Skia and the command buffer.
,
May 6 2016
We should be able to eliminate the "opacity" pass by applying it in-line in cc's RenderSurface draw pass, and doing the rest of the DAG in Skia.
,
May 12 2016
Note: I'm a little suspicious of the Safari numbers here. Setting Fixed Complexity to 1000 in this demo, Animometer claims 10-17FPS, but the FPS meter in Quartz Debug reports 3-4FPS. This is also visually noticeable: the result looks a lot more like 3-4FPS than 10+.
,
May 13 2016
,
Jun 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ff3dc65b0f7845184458fb25b3d566fa079cd232 commit ff3dc65b0f7845184458fb25b3d566fa079cd232 Author: enne <enne@chromium.org> Date: Fri Jun 10 00:52:09 2016 Optimize render passes with single quads Many effects (masks, replicas, filters) generate render passes for simplicity in the code. However, in the cases where the pass contains a single quad with a texture, that resulting texture could just be used as the input texture instead of the render pass itself. The complication is mostly that render passes and tile textures are flipped relative to each other (oops) and so some knowledge of this has to leak into drawing render passes. This is done by detecting such render passes inside of DirectRenderer, storing the TileQuad that would have been drawn, skipping allocating the pass and rendering it, and then calling a slightly modified version of DrawRenderPassQuad with the TileQuad's resource. The check for which render passes can be supported is conservative to start. This optimization usually will not be supported on mac because skia does not support textures with texture rectangle targets as input. BUG= 254639 , 606672 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/1960543002 Cr-Commit-Position: refs/heads/master@{#399060} [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/direct_renderer.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/direct_renderer.h [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/gl_renderer.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/gl_renderer.h [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/data/rotated_drop_shadow_filter_gl.png [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/data/rotated_drop_shadow_filter_sw.png [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/solid_color_content_layer_client.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/solid_color_content_layer_client.h [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/trees/layer_tree_host_pixeltest_filters.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/trees/layer_tree_host_pixeltest_masks.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/third_party/WebKit/LayoutTests/TestExpectations [delete] https://crrev.com/3e75809d6084ec6ae9694cc5ba20990be37ec49a/third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-hw-expected.html
,
Jun 10 2016
From what Brian said on the CL, Skia has support for those textures but we need some plumbing through the command buffer. Is that feasible? Should we file a separate bug?
,
Jun 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/95a0c4522dbb71c522c09798e7dbc77a7285d1ea commit 95a0c4522dbb71c522c09798e7dbc77a7285d1ea Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Fri Jun 10 22:52:37 2016 Revert of Optimize render passes with single quads (patchset #13 id:240001 of https://codereview.chromium.org/1960543002/ ) Reason for revert: Context menu is broken on Linux: https://drive.google.com/file/d/0B7RLEApsOKBLNGZDai1JT0kwR2M/view?usp=sharing BUG= 619185 Original issue's description: > Optimize render passes with single quads > > Many effects (masks, replicas, filters) generate render passes for > simplicity in the code. However, in the cases where the pass contains a > single quad with a texture, that resulting texture could just be used as > the input texture instead of the render pass itself. > > The complication is mostly that render passes and tile textures are > flipped relative to each other (oops) and so some knowledge of this has > to leak into drawing render passes. > > This is done by detecting such render passes inside of DirectRenderer, > storing the TileQuad that would have been drawn, skipping allocating the > pass and rendering it, and then calling a slightly modified version of > DrawRenderPassQuad with the TileQuad's resource. The check for which > render passes can be supported is conservative to start. > > This optimization usually will not be supported on mac because skia > does not support textures with texture rectangle targets as input. > > BUG= 254639 , 606672 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232 > Cr-Commit-Position: refs/heads/master@{#399060} TBR=ericrk@chromium.org,senorblanco@chromium.org,enne@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 254639 , 606672 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2058013003 Cr-Commit-Position: refs/heads/master@{#399308} [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/direct_renderer.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/direct_renderer.h [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/gl_renderer.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/gl_renderer.h [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/data/rotated_drop_shadow_filter_gl.png [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/data/rotated_drop_shadow_filter_sw.png [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/solid_color_content_layer_client.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/solid_color_content_layer_client.h [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/trees/layer_tree_host_pixeltest_filters.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/trees/layer_tree_host_pixeltest_masks.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-hw-expected.html
,
Jun 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949 commit 4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949 Author: enne <enne@chromium.org> Date: Mon Jun 13 21:00:03 2016 Optimize render passes with single quads Many effects (masks, replicas, filters) generate render passes for simplicity in the code. However, in the cases where the pass contains a single quad with a texture, that resulting texture could just be used as the input texture instead of the render pass itself. The complication is mostly that render passes and tile textures are flipped relative to each other (oops) and so some knowledge of this has to leak into drawing render passes. This is done by detecting such render passes inside of DirectRenderer, storing the TileQuad that would have been drawn, skipping allocating the pass and rendering it, and then calling a slightly modified version of DrawRenderPassQuad with the TileQuad's resource. The check for which render passes can be supported is conservative to start. This optimization usually will not be supported on mac because skia does not support textures with texture rectangle targets as input. BUG= 254639 , 606672 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232 Review-Url: https://codereview.chromium.org/1960543002 Cr-Original-Commit-Position: refs/heads/master@{#399060} Cr-Commit-Position: refs/heads/master@{#399532} [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/direct_renderer.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/direct_renderer.h [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/gl_renderer.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/gl_renderer.h [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/data/rotated_drop_shadow_filter_gl.png [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/data/rotated_drop_shadow_filter_sw.png [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/solid_color_content_layer_client.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/solid_color_content_layer_client.h [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/trees/layer_tree_host_pixeltest_filters.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/trees/layer_tree_host_pixeltest_masks.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/third_party/WebKit/LayoutTests/TestExpectations [delete] https://crrev.com/e044e1cf503b7635d746d6b34594195eeac10dba/third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-hw-expected.html
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ff3dc65b0f7845184458fb25b3d566fa079cd232 commit ff3dc65b0f7845184458fb25b3d566fa079cd232 Author: enne <enne@chromium.org> Date: Fri Jun 10 00:52:09 2016 Optimize render passes with single quads Many effects (masks, replicas, filters) generate render passes for simplicity in the code. However, in the cases where the pass contains a single quad with a texture, that resulting texture could just be used as the input texture instead of the render pass itself. The complication is mostly that render passes and tile textures are flipped relative to each other (oops) and so some knowledge of this has to leak into drawing render passes. This is done by detecting such render passes inside of DirectRenderer, storing the TileQuad that would have been drawn, skipping allocating the pass and rendering it, and then calling a slightly modified version of DrawRenderPassQuad with the TileQuad's resource. The check for which render passes can be supported is conservative to start. This optimization usually will not be supported on mac because skia does not support textures with texture rectangle targets as input. BUG= 254639 , 606672 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/1960543002 Cr-Commit-Position: refs/heads/master@{#399060} [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/direct_renderer.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/direct_renderer.h [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/gl_renderer.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/output/gl_renderer.h [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/data/rotated_drop_shadow_filter_gl.png [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/data/rotated_drop_shadow_filter_sw.png [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/solid_color_content_layer_client.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/test/solid_color_content_layer_client.h [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/trees/layer_tree_host_pixeltest_filters.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/cc/trees/layer_tree_host_pixeltest_masks.cc [modify] https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232/third_party/WebKit/LayoutTests/TestExpectations [delete] https://crrev.com/3e75809d6084ec6ae9694cc5ba20990be37ec49a/third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-hw-expected.html
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/95a0c4522dbb71c522c09798e7dbc77a7285d1ea commit 95a0c4522dbb71c522c09798e7dbc77a7285d1ea Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Fri Jun 10 22:52:37 2016 Revert of Optimize render passes with single quads (patchset #13 id:240001 of https://codereview.chromium.org/1960543002/ ) Reason for revert: Context menu is broken on Linux: https://drive.google.com/file/d/0B7RLEApsOKBLNGZDai1JT0kwR2M/view?usp=sharing BUG= 619185 Original issue's description: > Optimize render passes with single quads > > Many effects (masks, replicas, filters) generate render passes for > simplicity in the code. However, in the cases where the pass contains a > single quad with a texture, that resulting texture could just be used as > the input texture instead of the render pass itself. > > The complication is mostly that render passes and tile textures are > flipped relative to each other (oops) and so some knowledge of this has > to leak into drawing render passes. > > This is done by detecting such render passes inside of DirectRenderer, > storing the TileQuad that would have been drawn, skipping allocating the > pass and rendering it, and then calling a slightly modified version of > DrawRenderPassQuad with the TileQuad's resource. The check for which > render passes can be supported is conservative to start. > > This optimization usually will not be supported on mac because skia > does not support textures with texture rectangle targets as input. > > BUG= 254639 , 606672 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232 > Cr-Commit-Position: refs/heads/master@{#399060} TBR=ericrk@chromium.org,senorblanco@chromium.org,enne@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 254639 , 606672 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2058013003 Cr-Commit-Position: refs/heads/master@{#399308} [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/direct_renderer.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/direct_renderer.h [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/gl_renderer.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/output/gl_renderer.h [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/data/rotated_drop_shadow_filter_gl.png [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/data/rotated_drop_shadow_filter_sw.png [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/solid_color_content_layer_client.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/test/solid_color_content_layer_client.h [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/trees/layer_tree_host_pixeltest_filters.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/cc/trees/layer_tree_host_pixeltest_masks.cc [modify] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/95a0c4522dbb71c522c09798e7dbc77a7285d1ea/third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-hw-expected.html
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949 commit 4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949 Author: enne <enne@chromium.org> Date: Mon Jun 13 21:00:03 2016 Optimize render passes with single quads Many effects (masks, replicas, filters) generate render passes for simplicity in the code. However, in the cases where the pass contains a single quad with a texture, that resulting texture could just be used as the input texture instead of the render pass itself. The complication is mostly that render passes and tile textures are flipped relative to each other (oops) and so some knowledge of this has to leak into drawing render passes. This is done by detecting such render passes inside of DirectRenderer, storing the TileQuad that would have been drawn, skipping allocating the pass and rendering it, and then calling a slightly modified version of DrawRenderPassQuad with the TileQuad's resource. The check for which render passes can be supported is conservative to start. This optimization usually will not be supported on mac because skia does not support textures with texture rectangle targets as input. BUG= 254639 , 606672 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232 Review-Url: https://codereview.chromium.org/1960543002 Cr-Original-Commit-Position: refs/heads/master@{#399060} Cr-Commit-Position: refs/heads/master@{#399532} [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/direct_renderer.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/direct_renderer.h [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/gl_renderer.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/output/gl_renderer.h [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/data/rotated_drop_shadow_filter_gl.png [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/data/rotated_drop_shadow_filter_sw.png [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/solid_color_content_layer_client.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/test/solid_color_content_layer_client.h [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/trees/layer_tree_host_pixeltest_filters.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/cc/trees/layer_tree_host_pixeltest_masks.cc [modify] https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949/third_party/WebKit/LayoutTests/TestExpectations [delete] https://crrev.com/e044e1cf503b7635d746d6b34594195eeac10dba/third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-hw-expected.html
,
Jul 11 2016
We've investigated the performance and made some great improvements. There's still one remaining optimization we know of, which is to enable the render surface texture optimization on Mac (http://crbug.com/627105). I'm nudging the priority down to 3.
,
Jul 11 2016
,
Aug 12 2016
,
May 8 2017
Given that there's one blocker, I'm going to close this meta bug and leave the remaining feature request open. |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by vmi...@chromium.org
, May 3 2016Owner: senorblanco@chromium.org