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

Issue 2321883002: cc: Remove SetMemoryPolicy from OutputSurface and Display. (Closed)

Created:
4 years, 3 months ago by danakj
Modified:
4 years, 3 months ago
CC:
android-webview-reviews_chromium.org, cc-bugs_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, piman+watch_chromium.org, piman, rjkroege
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Remove SetMemoryPolicy from OutputSurface and Display. This method is plumbed through the Display but nothing ever actually goes there. The only usage of this is: 1) WebView changes the policy based on SyncCompositorMsg_SetMemoryPolicy but it does so from SynchronousCompositorOutputSurface by calling the OutputSurfaceClient (LayerTreeHostImpl) directly. 2) CompositorOutputSurface sets a limit when using software compositing. Instead of 2, pass both gpu and software limits in the LayerTreeSettings, and have LayerTreeHostImpl use the software limits directly when given a software output surface. And remove the plumbing through Display and replace it with a NOTREACHED. This means we don't have to support the method at all on the "OutputSurfaceClient" that Display uses, only the one that LayerTreeHostImpl uses. Left a comment on OutputSurfaceClient::SetMemoryPolicy() that it is only used by WebView now. crbug.com/499004 suggests that the WebView usage could also be replaced with something else. WebView seems to only be changing the bytes part of the limit, so probably the method only needs to take that, and I feel like the implementation in LayerTreeHostImpl could probably be cleaned up some more yet also. R=enne TBR=wez BUG=499004, 606056 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/aa5c49175702f57438c939a7e4796ff19de4b681 Cr-Commit-Position: refs/heads/master@{#417778}

Patch Set 1 #

Patch Set 2 : setmemorypolicy #

Total comments: 6

Patch Set 3 : git cl try #

Patch Set 4 : blimp #

Total comments: 1

Patch Set 5 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -170 lines) Patch
M android_webview/browser/surfaces_instance.h View 1 chunk +0 lines, -1 line 0 comments Download
M blimp/client/support/compositor/blimp_layer_tree_settings.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M cc/output/output_surface.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/output/output_surface.cc View 1 chunk +0 lines, -10 lines 0 comments Download
M cc/output/output_surface_client.h View 2 chunks +3 lines, -1 line 0 comments Download
M cc/surfaces/display.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/surfaces/display_client.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/surfaces/display_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M cc/surfaces/surface_display_output_surface.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/surfaces/surface_display_output_surface.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M cc/test/fake_output_surface.h View 3 chunks +0 lines, -5 lines 0 comments Download
M cc/test/fake_output_surface.cc View 2 chunks +0 lines, -9 lines 0 comments Download
M cc/test/test_delegating_output_surface.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/test/test_delegating_output_surface.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 3 chunks +7 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 chunk +79 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 chunk +0 lines, -79 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 2 chunks +8 lines, -4 lines 0 comments Download
M cc/trees/proxy_common_unittest.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M cc/trees/proxy_impl.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M content/renderer/android/synchronous_compositor_output_surface.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/renderer/gpu/compositor_output_surface.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M services/ui/surfaces/display_compositor.h View 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/surfaces/display_compositor.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 1 chunk +3 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 43 (23 generated)
danakj
4 years, 3 months ago (2016-09-08 03:32:39 UTC) #3
danakj
Actually bo, can you review the webview bits please (in webview/ and content/)?
4 years, 3 months ago (2016-09-08 03:34:20 UTC) #7
danakj
+fsamuel for mus parts
4 years, 3 months ago (2016-09-08 03:35:03 UTC) #9
boliu
lgtm although crbug.com/499004 isn't actually about removing SetMemoryPolicy from LTHI, but rather remove the webview-specific ...
4 years, 3 months ago (2016-09-08 03:47:43 UTC) #12
Fady Samuel
lgtm
4 years, 3 months ago (2016-09-08 22:52:48 UTC) #13
danakj
Fixed the compile issue, ui/compositor needs to use the new setting name.
4 years, 3 months ago (2016-09-08 23:17:34 UTC) #15
enne (OOO)
lgtm % nits https://codereview.chromium.org/2321883002/diff/20001/cc/trees/layer_tree_settings.cc File cc/trees/layer_tree_settings.cc (right): https://codereview.chromium.org/2321883002/diff/20001/cc/trees/layer_tree_settings.cc#newcode19 cc/trees/layer_tree_settings.cc:19: // These limits inherited from CompositorOutputSurface ...
4 years, 3 months ago (2016-09-09 22:46:17 UTC) #19
danakj
blimp
4 years, 3 months ago (2016-09-09 22:50:28 UTC) #20
danakj
https://codereview.chromium.org/2321883002/diff/20001/cc/trees/layer_tree_settings.cc File cc/trees/layer_tree_settings.cc (right): https://codereview.chromium.org/2321883002/diff/20001/cc/trees/layer_tree_settings.cc#newcode19 cc/trees/layer_tree_settings.cc:19: // These limits inherited from CompositorOutputSurface without On 2016/09/09 ...
4 years, 3 months ago (2016-09-09 22:55:43 UTC) #21
danakj
nits
4 years, 3 months ago (2016-09-09 22:56:21 UTC) #22
Khushal
On 2016/09/09 22:50:28, danakj wrote: > blimp lgtm thanks!
4 years, 3 months ago (2016-09-09 22:58:21 UTC) #23
danakj
+wez for blimp/
4 years, 3 months ago (2016-09-09 22:58:40 UTC) #25
Khushal
https://codereview.chromium.org/2321883002/diff/60001/blimp/client/support/compositor/blimp_layer_tree_settings.cc File blimp/client/support/compositor/blimp_layer_tree_settings.cc (right): https://codereview.chromium.org/2321883002/diff/60001/blimp/client/support/compositor/blimp_layer_tree_settings.cc#newcode105 blimp/client/support/compositor/blimp_layer_tree_settings.cc:105: cc::ManagedMemoryPolicy& memory_policy = settings->gpu_memory_policy; o_o
4 years, 3 months ago (2016-09-09 22:58:41 UTC) #26
enne (OOO)
Re: breadcrumbs. I think blame would show your patch and could show where it came ...
4 years, 3 months ago (2016-09-09 22:59:01 UTC) #27
danakj
On Fri, Sep 9, 2016 at 3:59 PM, enne@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com> wrote: > Re: ...
4 years, 3 months ago (2016-09-09 23:02:35 UTC) #28
danakj
Oops didn't actually add wez/ for blimp. But I'll TBR since Khushal reviewed it.
4 years, 3 months ago (2016-09-09 23:18:27 UTC) #33
danakj
Oops didn't actually add wez/ for blimp. But I'll TBR since Khushal reviewed it.
4 years, 3 months ago (2016-09-09 23:18:28 UTC) #34
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/2321883002/80001
4 years, 3 months ago (2016-09-09 23:46:31 UTC) #39
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-10 00:28:45 UTC) #41
commit-bot: I haz the power
4 years, 3 months ago (2016-09-10 00:32:33 UTC) #43
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/aa5c49175702f57438c939a7e4796ff19de4b681
Cr-Commit-Position: refs/heads/master@{#417778}

Powered by Google App Engine
This is Rietveld 408576698