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

Issue 1966073002: Reland: Correctly handle damage involving filters in SurfaceAggregator (Closed)

Created:
4 years, 7 months ago by jbauman
Modified:
4 years, 7 months ago
Reviewers:
Stephen White, piman
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: Correctly handle damage involving filters in SurfaceAggregator There are two main issues with the handling of damage of contents affected by RenderPassDrawQuad filters: 1) Damage of a small part of a source Surface can affect a large part of the destination and 2) To draw damage on the destination, an unexpectedly large portion of the source must be used. To deal with these, the SurfaceAggregator must keep track of all output render passes affected by filters. Any Surface in an affected RenderPass will cause its parent Surface to be completely damaged (handling #1 above). To handle #2, affected RenderPasses will have their damage rects set to contain the entire output_rect. Then DirectRenderer can use that damage rect to determine what to draw. In the case that overlays are used the root damage rect can temporarily be expanded for the frame, so in that case the entire child renderpass needs to be drawn. CopyRequests can also cause areas outside the damage rect to be read, so any RenderPass inside a CopyRequest (directly or indirectly) will have its damage rect set to the output rect. This system is very pessimistic about what should be drawn, but in general it shouldn't affect that many cases and should always be correct. BUG=602941 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/fe19524b2c646dc6b7b8b4849e9139216805c0a7 Cr-Commit-Position: refs/heads/master@{#393084}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -44 lines) Patch
M cc/output/direct_renderer.cc View 1 chunk +11 lines, -16 lines 0 comments Download
M cc/surfaces/surface_aggregator.h View 4 chunks +21 lines, -2 lines 0 comments Download
M cc/surfaces/surface_aggregator.cc View 13 chunks +113 lines, -18 lines 1 comment Download
M cc/surfaces/surface_aggregator_unittest.cc View 5 chunks +114 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
jbauman
The only difference from the previous patch is in the case where the overlay code ...
4 years, 7 months ago (2016-05-11 00:18:25 UTC) #4
piman
lgtm
4 years, 7 months ago (2016-05-11 19:07:06 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1966073002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1966073002/1
4 years, 7 months ago (2016-05-11 20:19:45 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-11 22:06:25 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/fe19524b2c646dc6b7b8b4849e9139216805c0a7 Cr-Commit-Position: refs/heads/master@{#393084}
4 years, 7 months ago (2016-05-11 22:07:46 UTC) #11
Stephen White
https://codereview.chromium.org/1966073002/diff/1/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/1966073002/diff/1/cc/surfaces/surface_aggregator.cc#newcode664 cc/surfaces/surface_aggregator.cc:664: damage_rect = full_damage; FYI, we could use FilterOperation::MapRect() here ...
4 years, 7 months ago (2016-05-12 15:32:11 UTC) #13
jbauman
4 years, 7 months ago (2016-05-13 00:41:14 UTC) #14
Message was sent while issue was closed.
On 2016/05/12 15:32:11, Stephen White wrote:
>
https://codereview.chromium.org/1966073002/diff/1/cc/surfaces/surface_aggrega...
> File cc/surfaces/surface_aggregator.cc (right):
> 
>
https://codereview.chromium.org/1966073002/diff/1/cc/surfaces/surface_aggrega...
> cc/surfaces/surface_aggregator.cc:664: damage_rect = full_damage;
> FYI, we could use FilterOperation::MapRect() here to get an exact mapping of
the
> damage rect, if we still have access to the filter operations that at this
> level. However, we'll have to add the map direction as a param to MapRect,
since
> I think we need SkImageFilter::kReverse_MapDirection.

Yeah, though we'd need to reconstruct the complete renderpass tree, including
transforms and filters at every RenderPassDrawQuad, to be able to do that. I
figure we can add that complexity if this seems like a performance issue.

Powered by Google App Engine
This is Rietveld 408576698