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

Issue 2822143003: Remove ForceReclaimResources (Closed)

Created:
3 years, 8 months ago by kylechar
Modified:
3 years, 7 months ago
Reviewers:
danakj, ericrk, sky, enne (OOO)
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Ian Vollick, jam, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org, jochen+watch_chromium.org, einbinder+watch-test-runner_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove CompositorFrameSink::ForceReclaimResources(). This is CL is based off of http://crrev.com/2609253003. The CL was rebased and ui/compositor/layer_unittest.cc modified to pass. Some pieces of the original CL had already been landed in separate CLs. Calling ForceReclaimResources() in LayerTreeHostImpl::BeginCommit() returns all texture resources and avoid some double buffering overhead. This optimization won't work across any thread/process boundaries, so it's only used for the main browser UI compositor and not renderer compositors. We are planning on moving the display compositor to a separate process and this browser UI compositor optimization will no longer be possible with the mus graphics architecture. This CL removes CompositorFrameSink::ForceReclaimResources() and associated code. This will cause a memory regression for Win/Linux/Mac/CrOS. However, only browser UI tiles that are actively being rastered will be double buffered, so the regression should be small. BUG=489515 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2822143003 Cr-Commit-Position: refs/heads/master@{#467456} Committed: https://chromium.googlesource.com/chromium/src/+/cf88963a80844b8ed00484ec191e5a952e2b9b07

Patch Set 1 #

Patch Set 2 : Fix test. #

Patch Set 3 : Rebase. #

Total comments: 3

Patch Set 4 : Rebase. #

Patch Set 5 : Change to RunLoop. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -164 lines) Patch
M cc/layers/texture_layer_unittest.cc View 1 2 3 1 chunk +1 line, -5 lines 0 comments Download
M cc/output/compositor_frame_sink.h View 2 chunks +7 lines, -7 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M cc/surfaces/compositor_frame_sink_support.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/surfaces/direct_compositor_frame_sink.cc View 3 chunks +2 lines, -6 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink_unittest.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M cc/surfaces/surface.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M cc/surfaces/surface.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M cc/surfaces/surface_factory.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M cc/surfaces/surface_factory.cc View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 1 chunk +1 line, -5 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M cc/test/test_compositor_frame_sink.h View 2 chunks +1 line, -3 lines 0 comments Download
M cc/test/test_compositor_frame_sink.cc View 1 2 3 chunks +1 line, -14 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 3 chunks +3 lines, -13 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 2 chunks +1 line, -28 lines 0 comments Download
M cc/trees/layer_tree_host_pixeltest_tiles.cc View 1 chunk +11 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 6 chunks +8 lines, -28 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/test/layouttest_support.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 2 chunks +15 lines, -8 lines 0 comments Download

Messages

Total messages: 48 (33 generated)
kylechar
ericrk: Sending this to you for an initial review/sanity check. The only real code change ...
3 years, 8 months ago (2017-04-20 14:16:37 UTC) #15
kylechar
Here are some (maybe) interesting metrics: win-x64: memory:chrome:all_processes:reported_by_chrome:cc:effective_size: +64.9KB memory:chrome:all_processes:reported_by_chrome:peak_size: +3.2MB win: memory:chrome:all_processes:reported_by_chrome:cc:effective_size: -487.2KB memory:chrome:all_processes:reported_by_chrome:peak_size: ...
3 years, 8 months ago (2017-04-20 14:37:52 UTC) #16
ericrk
LGTM - the telemetry results seem fine to me - just a bit noisy. Let's ...
3 years, 8 months ago (2017-04-24 22:24:08 UTC) #17
kylechar
Thanks! Will keep an eye on those.
3 years, 8 months ago (2017-04-25 14:01:11 UTC) #18
kylechar
+danakj for ui/compositor/layer_unittest.cc (and more general look at cc/* if you feel like it) +enne ...
3 years, 8 months ago (2017-04-25 14:09:05 UTC) #21
danakj
ui/compositor LGTM
3 years, 8 months ago (2017-04-25 14:19:12 UTC) #22
danakj
https://codereview.chromium.org/2822143003/diff/60001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/2822143003/diff/60001/ui/compositor/layer_unittest.cc#newcode1145 ui/compositor/layer_unittest.cc:1145: // frame to ensure that the mailbox's release callback ...
3 years, 8 months ago (2017-04-25 14:20:42 UTC) #23
kylechar
https://codereview.chromium.org/2822143003/diff/60001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/2822143003/diff/60001/ui/compositor/layer_unittest.cc#newcode1145 ui/compositor/layer_unittest.cc:1145: // frame to ensure that the mailbox's release callback ...
3 years, 8 months ago (2017-04-25 16:25:01 UTC) #24
danakj
Yeah, thanks :) LGTM
3 years, 8 months ago (2017-04-25 16:58:18 UTC) #25
sky
LGTM
3 years, 8 months ago (2017-04-25 17:40:45 UTC) #28
enne (OOO)
lgtm
3 years, 8 months ago (2017-04-26 19:48:20 UTC) #35
kylechar
Thanks!
3 years, 8 months ago (2017-04-26 19:48:45 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2822143003/100001
3 years, 8 months ago (2017-04-26 20:43:25 UTC) #44
commit-bot: I haz the power
Committed patchset #5 (id:100001) as https://chromium.googlesource.com/chromium/src/+/cf88963a80844b8ed00484ec191e5a952e2b9b07
3 years, 8 months ago (2017-04-26 21:09:22 UTC) #47
kylechar
3 years, 7 months ago (2017-04-28 14:10:15 UTC) #48
Message was sent while issue was closed.
On 2017/04/26 21:09:22, commit-bot: I haz the power wrote:
> Committed patchset #5 (id:100001) as
>
https://chromium.googlesource.com/chromium/src/+/cf88963a80844b8ed00484ec191e...

This produced the same ~500KB memory regression that the previous reverted CL
also introduced. This is expected (unfortunately).

https://chromeperf.appspot.com/report?sid=a82a20f2563b7313176f76d2e7d91ed7d8e...

Powered by Google App Engine
This is Rietveld 408576698