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

Issue 1324413003: Move gpu memory calculations to Compositor. (Closed)

Created:
5 years, 3 months ago by sohanjg
Modified:
5 years, 2 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, piman+watch_chromium.org, sohanjg_
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move gpu memory calculations to Compositor. This moves gpu memory policy code from gpumemorymanager to renderer compositor. It will be useful for renderer to use off screen context. BUG=526196 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/127a06b45820e30f78079814557cfacd038d6167 Cr-Commit-Position: refs/heads/master@{#352301}

Patch Set 1 #

Total comments: 2

Patch Set 2 : move memory clamping code to RWC. #

Total comments: 8

Patch Set 3 : remove setmemorypolicychangecallback. #

Total comments: 1

Patch Set 4 : remove more memory alloc codes. #

Total comments: 10

Patch Set 5 : remove more redundant code. #

Total comments: 4

Patch Set 6 : rebase and remove redundant test. #

Patch Set 7 : tests updated. #

Patch Set 8 : rebase to ToT. #

Total comments: 2

Patch Set 9 : cleanup unused test,code. #

Total comments: 8

Patch Set 10 : avoid unnecessary casts. #

Total comments: 2

Patch Set 11 : review comment + android_arm64_dbg_recipe bot issue. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -587 lines) Patch
M android_webview/browser/aw_render_thread_context_provider.h View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M android_webview/browser/aw_render_thread_context_provider.cc View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download
M blimp/client/compositor/blimp_context_provider.h View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M blimp/client/compositor/blimp_context_provider.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M cc/output/context_provider.h View 1 2 3 4 5 1 chunk +0 lines, -7 lines 0 comments Download
M cc/output/output_surface.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -4 lines 0 comments Download
M cc/output/output_surface_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -31 lines 0 comments Download
M cc/raster/tile_task_worker_pool_perftest.cc View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M cc/test/test_context_provider.h View 1 2 3 4 5 3 chunks +0 lines, -5 lines 0 comments Download
M cc/test/test_context_provider.cc View 1 2 3 4 5 2 chunks +0 lines, -14 lines 0 comments Download
M cc/test/test_in_process_context_provider.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M cc/test/test_in_process_context_provider.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M cc/tiles/tile_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -14 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M components/mus/public/cpp/context_provider.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M components/mus/surfaces/surfaces_context_provider.h View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/android/in_process/context_provider_in_process.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/android/in_process/context_provider_in_process.cc View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_context_provider.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_context_provider.cc View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.h View 1 2 3 4 5 3 chunks +0 lines, -7 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.cc View 1 2 3 4 5 3 chunks +0 lines, -19 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.h View 1 2 3 4 3 chunks +0 lines, -5 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 1 2 3 4 5 6 3 chunks +1 line, -29 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 5 3 chunks +0 lines, -9 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 7 chunks +2 lines, -39 lines 0 comments Download
M content/common/gpu/gpu_memory_manager.h View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M content/common/gpu/gpu_memory_manager.cc View 1 2 3 2 chunks +0 lines, -111 lines 0 comments Download
M content/common/gpu/gpu_memory_manager_client.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M content/common/gpu/gpu_memory_manager_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -217 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +84 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_provider.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M ui/compositor/test/in_process_context_provider.cc View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 71 (23 generated)
sohanjg
This is not final patch. Just wanted to know, if this approach is correct. I ...
5 years, 3 months ago (2015-09-08 14:47:23 UTC) #2
danakj
chris can you have a look?
5 years, 3 months ago (2015-09-08 18:10:41 UTC) #4
ccameron
I like the approach. What's the plan for the ui::Compositor, though? Should we ever impose ...
5 years, 3 months ago (2015-09-11 18:22:58 UTC) #5
sohanjg
i have moved the GpuMemoryManager::UpdateAvailableGpuMemory as part of RWC::GetGpuMemoryPolicy too. i think ui compositor doesn't ...
5 years, 3 months ago (2015-09-14 14:32:39 UTC) #6
ccameron
Couple more nits, but this is coming along. https://codereview.chromium.org/1324413003/diff/20001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/1324413003/diff/20001/content/renderer/gpu/render_widget_compositor.cc#newcode1057 content/renderer/gpu/render_widget_compositor.cc:1057: static ...
5 years, 3 months ago (2015-09-14 17:44:51 UTC) #7
sohanjg
what should be the plan with SetMemoryAllocation, SetMemoryPolicy ? Should we remove them as part ...
5 years, 3 months ago (2015-09-15 10:37:48 UTC) #8
piman
https://codereview.chromium.org/1324413003/diff/40001/content/common/gpu/client/context_provider_command_buffer.cc File content/common/gpu/client/context_provider_command_buffer.cc (left): https://codereview.chromium.org/1324413003/diff/40001/content/common/gpu/client/context_provider_command_buffer.cc#oldcode244 content/common/gpu/client/context_provider_command_buffer.cc:244: context3d_->GetCommandBufferProxy()->SetMemoryAllocationChangedCallback( Drive-by, this is the only caller of CommandBufferProxyImpl::SetMemoryAllocationChangedCallback, ...
5 years, 3 months ago (2015-09-18 01:43:27 UTC) #10
ccameron
On 2015/09/18 01:43:27, piman (slow to review) wrote: > https://codereview.chromium.org/1324413003/diff/40001/content/common/gpu/client/context_provider_command_buffer.cc > File content/common/gpu/client/context_provider_command_buffer.cc (left): > ...
5 years, 3 months ago (2015-09-18 18:19:57 UTC) #11
piman
On Fri, Sep 18, 2015 at 11:19 AM, <ccameron@chromium.org> wrote: > On 2015/09/18 01:43:27, piman ...
5 years, 3 months ago (2015-09-18 21:16:14 UTC) #12
piman
Any progress? After https://codereview.chromium.org/1366473002/ and https://codereview.chromium.org/1365563002/ I have a CL that would make the renderer ...
5 years, 3 months ago (2015-09-23 06:27:04 UTC) #13
sohanjg
On 2015/09/23 06:27:04, piman (slow to review) wrote: > Any progress? After https://codereview.chromium.org/1366473002/ and > ...
5 years, 3 months ago (2015-09-23 06:44:44 UTC) #14
sohanjg
On 2015/09/23 06:44:44, sohanjg wrote: > On 2015/09/23 06:27:04, piman (slow to review) wrote: > ...
5 years, 3 months ago (2015-09-23 13:23:01 UTC) #16
piman
Some more things to remove. I understand you will clean up the GpuMemoryManager as a ...
5 years, 3 months ago (2015-09-24 21:34:08 UTC) #17
sohanjg
Please take a look, I will update some tests, if this is final. thanks. https://codereview.chromium.org/1324413003/diff/80001/cc/output/context_provider.h ...
5 years, 2 months ago (2015-09-28 07:35:50 UTC) #18
piman
LGTM in essence, couple of points. https://codereview.chromium.org/1324413003/diff/100001/cc/output/output_surface_unittest.cc File cc/output/output_surface_unittest.cc (left): https://codereview.chromium.org/1324413003/diff/100001/cc/output/output_surface_unittest.cc#oldcode169 cc/output/output_surface_unittest.cc:169: context_provider->SetMemoryAllocation(policy); I assume ...
5 years, 2 months ago (2015-09-28 18:32:38 UTC) #19
sohanjg
The OutputSurface test wont be valid anymore as we are not passing the gpu mem ...
5 years, 2 months ago (2015-09-29 14:19:26 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1324413003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1324413003/120001
5 years, 2 months ago (2015-09-29 14:25:24 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/119858) mac_chromium_rel_ng on ...
5 years, 2 months ago (2015-09-29 14:35:34 UTC) #24
piman
LGTM. I don't think a RWC test per se would be a good bang-for-buck. Where ...
5 years, 2 months ago (2015-09-29 16:11:12 UTC) #25
sohanjg
On 2015/09/29 16:11:12, piman (slow to review) wrote: > LGTM. I don't think a RWC ...
5 years, 2 months ago (2015-09-30 12:34:40 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1324413003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1324413003/140001
5 years, 2 months ago (2015-09-30 12:37:00 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/138826) android_compile_dbg on ...
5 years, 2 months ago (2015-09-30 12:41:15 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1324413003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1324413003/160001
5 years, 2 months ago (2015-09-30 14:53:34 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/138861)
5 years, 2 months ago (2015-09-30 15:26:50 UTC) #34
piman
lgtm https://codereview.chromium.org/1324413003/diff/160001/content/common/gpu/gpu_memory_manager_unittest.cc File content/common/gpu/gpu_memory_manager_unittest.cc (right): https://codereview.chromium.org/1324413003/diff/160001/content/common/gpu/gpu_memory_manager_unittest.cc#newcode191 content/common/gpu/gpu_memory_manager_unittest.cc:191: // TODO(sohanjg): Clean up as part of crbug.com/537563. ...
5 years, 2 months ago (2015-09-30 19:04:33 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1324413003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1324413003/180001
5 years, 2 months ago (2015-10-01 05:39:02 UTC) #37
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-01 07:12:48 UTC) #39
sohanjg
Removed an extra MemoryPolicyChangedCallback occurrence. https://codereview.chromium.org/1324413003/diff/160001/content/common/gpu/gpu_memory_manager_unittest.cc File content/common/gpu/gpu_memory_manager_unittest.cc (right): https://codereview.chromium.org/1324413003/diff/160001/content/common/gpu/gpu_memory_manager_unittest.cc#newcode191 content/common/gpu/gpu_memory_manager_unittest.cc:191: // TODO(sohanjg): Clean up ...
5 years, 2 months ago (2015-10-01 07:14:13 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1324413003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1324413003/180001
5 years, 2 months ago (2015-10-01 08:54:12 UTC) #43
sohanjg
On 2015/10/01 08:54:12, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
5 years, 2 months ago (2015-10-01 09:08:21 UTC) #46
blundell
blundell -> sky Prefer to use individual component owners when possible.
5 years, 2 months ago (2015-10-01 09:11:38 UTC) #48
blundell
On 2015/10/01 09:11:38, blundell wrote: > blundell -> sky > > Prefer to use individual ...
5 years, 2 months ago (2015-10-01 09:12:07 UTC) #49
boliu
a_w rubberstamp lgtm
5 years, 2 months ago (2015-10-01 16:30:16 UTC) #50
David Trainor- moved to gerrit
blimp/ rubberstamp lgtm.
5 years, 2 months ago (2015-10-02 08:08:17 UTC) #51
boliu
+msw for components/mus
5 years, 2 months ago (2015-10-02 17:07:19 UTC) #53
sky
LGTM
5 years, 2 months ago (2015-10-02 17:08:01 UTC) #54
boliu
+dcheng for content/common/gpu/gpu_messages.h
5 years, 2 months ago (2015-10-02 17:11:14 UTC) #56
dcheng
ipc changes seem fine but a few other comments https://codereview.chromium.org/1324413003/diff/180001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/1324413003/diff/180001/content/renderer/gpu/render_widget_compositor.cc#newcode1027 content/renderer/gpu/render_widget_compositor.cc:1027: ...
5 years, 2 months ago (2015-10-02 18:06:01 UTC) #57
sohanjg
Please take a look, thanks. https://codereview.chromium.org/1324413003/diff/180001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/1324413003/diff/180001/content/renderer/gpu/render_widget_compositor.cc#newcode1027 content/renderer/gpu/render_widget_compositor.cc:1027: base::StringToSizeT( On 2015/10/02 18:06:01, ...
5 years, 2 months ago (2015-10-05 06:08:44 UTC) #58
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1324413003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1324413003/200001
5 years, 2 months ago (2015-10-05 06:09:14 UTC) #60
dcheng
https://codereview.chromium.org/1324413003/diff/200001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/1324413003/diff/200001/content/renderer/gpu/render_widget_compositor.cc#newcode1032 content/renderer/gpu/render_widget_compositor.cc:1032: if (actual.bytes_limit_when_visible) I meant if (base::StringToSizeT(...)): the fact that ...
5 years, 2 months ago (2015-10-05 06:31:28 UTC) #61
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/127628)
5 years, 2 months ago (2015-10-05 06:42:22 UTC) #63
sohanjg
i had to revert back to casting the limits, because android_arm64_dbg_recipe reports error for it ...
5 years, 2 months ago (2015-10-05 06:56:45 UTC) #64
dcheng
lgtm
5 years, 2 months ago (2015-10-05 06:58:21 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1324413003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1324413003/220001
5 years, 2 months ago (2015-10-05 07:07:13 UTC) #68
commit-bot: I haz the power
Committed patchset #11 (id:220001)
5 years, 2 months ago (2015-10-05 08:23:41 UTC) #69
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/127a06b45820e30f78079814557cfacd038d6167 Cr-Commit-Position: refs/heads/master@{#352301}
5 years, 2 months ago (2015-10-05 08:24:25 UTC) #70
spang
5 years, 1 month ago (2015-10-29 17:21:36 UTC) #71
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:220001) has been created in
https://codereview.chromium.org/1412923004/ by spang@chromium.org.

The reason for reverting is: Hangs on Chrome OS when rotating the display.

BUG=546653.

Powered by Google App Engine
This is Rietveld 408576698