Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Issue 1960543002: Optimize render passes with single quads (Closed)

Created:
4 years, 7 months ago by enne (OOO)
Modified:
4 years, 6 months ago
Reviewers:
Stephen White, ericrk
CC:
bsalomon_chromium, cc-bugs_chromium.org, chromium-reviews, jbroman, vmiura
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 Committed: https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949 Cr-Original-Commit-Position: refs/heads/master@{#399060} Cr-Commit-Position: refs/heads/master@{#399532}

Patch Set 1 #

Patch Set 2 : Now mostly working #

Patch Set 3 : Fix masks and replicas #

Patch Set 4 : landable but no tests #

Patch Set 5 : Now with a test #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase #

Patch Set 8 : Rebase, with mac early outs #

Patch Set 9 : With filter test #

Total comments: 2

Patch Set 10 : Rebase #

Total comments: 2

Patch Set 11 : Expectations, comments, disable entirely on mac #

Patch Set 12 : Turn ref test into a pixel test #

Patch Set 13 : Now with correct filter inputs #

Total comments: 2

Patch Set 14 : Fix context menus #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -72 lines) Patch
M cc/output/direct_renderer.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -0 lines 0 comments Download
M cc/output/direct_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +23 lines, -3 lines 1 comment Download
M cc/output/gl_renderer.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +113 lines, -29 lines 0 comments Download
M cc/test/data/rotated_drop_shadow_filter_gl.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
M cc/test/data/rotated_drop_shadow_filter_sw.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
M cc/test/solid_color_content_layer_client.h View 1 2 3 4 2 chunks +11 lines, -1 line 0 comments Download
M cc/test/solid_color_content_layer_client.cc View 1 2 3 4 1 chunk +15 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_filters.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_masks.cc View 1 2 3 4 2 chunks +36 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +23 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/css3/filters/effect-all-on-background-hw-expected.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -34 lines 0 comments Download

Messages

Total messages: 38 (16 generated)
enne (OOO)
ericrk, senorblanco: this should be ready for review bsalomon: FYI, can't turn this optimization on ...
4 years, 6 months ago (2016-06-03 18:21:31 UTC) #8
bsalomon
On 2016/06/03 18:21:31, enne wrote: > ericrk, senorblanco: this should be ready for review > ...
4 years, 6 months ago (2016-06-03 18:43:15 UTC) #10
Stephen White
LGTM on the stuff I understand. Eric should look at the rest. :) https://codereview.chromium.org/1960543002/diff/160001/cc/output/gl_renderer.cc File ...
4 years, 6 months ago (2016-06-03 19:30:15 UTC) #11
enne (OOO)
https://codereview.chromium.org/1960543002/diff/160001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1960543002/diff/160001/cc/output/gl_renderer.cc#newcode1142 cc/output/gl_renderer.cc:1142: is_render_pass_input = On 2016/06/03 at 19:30:15, Stephen White wrote: ...
4 years, 6 months ago (2016-06-03 20:40:22 UTC) #12
ericrk
lgtm https://codereview.chromium.org/1960543002/diff/180001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1960543002/diff/180001/cc/output/gl_renderer.cc#newcode967 cc/output/gl_renderer.cc:967: bool flip_texture = false; Can you add a ...
4 years, 6 months ago (2016-06-07 20:23:17 UTC) #13
enne (OOO)
Thanks for the review. Re: layout tests. Linux and Windows layout tests failed the same ...
4 years, 6 months ago (2016-06-07 21:22:45 UTC) #14
enne (OOO)
Kept trying to land this and more and more tests kept failing and I kept ...
4 years, 6 months ago (2016-06-09 16:58:13 UTC) #15
Stephen White
On 2016/06/09 16:58:13, enne wrote: > Kept trying to land this and more and more ...
4 years, 6 months ago (2016-06-09 17:37:44 UTC) #17
Stephen White
+robertphillips Sorry you're having trouble landing this. If the rect passed to SkImage::makeWithFilter() looks correct, ...
4 years, 6 months ago (2016-06-09 17:45:59 UTC) #18
Stephen White
+robertphillips for realz
4 years, 6 months ago (2016-06-09 17:46:25 UTC) #19
enne (OOO)
https://codereview.chromium.org/1960543002/diff/240001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1960543002/diff/240001/cc/output/gl_renderer.cc#newcode644 cc/output/gl_renderer.cc:644: SkIRect in_subset = SkIRect::MakeWH(src_rect.width(), src_rect.height()); OOPS. Here was the ...
4 years, 6 months ago (2016-06-09 18:52:29 UTC) #20
Stephen White
LGTM even moar https://codereview.chromium.org/1960543002/diff/240001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1960543002/diff/240001/cc/output/gl_renderer.cc#newcode644 cc/output/gl_renderer.cc:644: SkIRect in_subset = SkIRect::MakeWH(src_rect.width(), src_rect.height()); On ...
4 years, 6 months ago (2016-06-09 19:48:28 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1960543002/240001
4 years, 6 months ago (2016-06-10 00:18:18 UTC) #24
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 6 months ago (2016-06-10 00:52:22 UTC) #26
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-10 00:52:25 UTC) #27
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/ff3dc65b0f7845184458fb25b3d566fa079cd232 Cr-Commit-Position: refs/heads/master@{#399060}
4 years, 6 months ago (2016-06-10 00:54:06 UTC) #29
kozy
A revert of this CL (patchset #13 id:240001) has been created in https://codereview.chromium.org/2058013003/ by kozyatinskiy@chromium.org. ...
4 years, 6 months ago (2016-06-10 22:03:58 UTC) #30
enne (OOO)
https://codereview.chromium.org/1960543002/diff/260001/cc/output/direct_renderer.cc File cc/output/direct_renderer.cc (right): https://codereview.chromium.org/1960543002/diff/260001/cc/output/direct_renderer.cc#newcode158 cc/output/direct_renderer.cc:158: if (pass != root_render_pass) { Maybe we shouldn't drop ...
4 years, 6 months ago (2016-06-13 18:41:17 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1960543002/260001
4 years, 6 months ago (2016-06-13 20:25:46 UTC) #34
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 6 months ago (2016-06-13 21:00:20 UTC) #35
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-13 21:00:35 UTC) #36
commit-bot: I haz the power
4 years, 6 months ago (2016-06-13 21:01:33 UTC) #38
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949
Cr-Commit-Position: refs/heads/master@{#399532}

Powered by Google App Engine
This is Rietveld 408576698