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

Issue 654223006: Cleanup GpuMemoryBuffer (Closed)

Created:
6 years, 2 months ago by alexst (slow to review)
Modified:
6 years, 1 month ago
Reviewers:
kenrb, jschuh, reveman, piman
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

We need to cleanup GpuMemoryBuffers allocated in the GPU process. This code conditionally stashes a sync point for buffer types that require it for the destruction phase. BUG=416873 Committed: https://crrev.com/2992e56e7d52e3158400980b312ecf0a8ddbfe1d Cr-Commit-Position: refs/heads/master@{#302561}

Patch Set 1 : #

Total comments: 5

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Total comments: 9

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Total comments: 5

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : rebase before changes #

Patch Set 9 : #

Total comments: 5

Patch Set 10 : comments #

Patch Set 11 : compile #

Patch Set 12 : compile #

Total comments: 8

Patch Set 13 : #

Total comments: 9

Patch Set 14 : style nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -35 lines) Patch
M cc/test/test_gpu_memory_buffer_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/test_gpu_memory_buffer_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/gpu/browser_gpu_memory_buffer_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/gpu/browser_gpu_memory_buffer_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +12 lines, -2 lines 0 comments Download
M content/browser/gpu/gpu_memory_buffer_factory_host_impl.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_memory_buffer_factory_host_impl.cc View 1 2 3 4 9 10 11 12 13 2 chunks +30 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M content/child/child_gpu_memory_buffer_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/child_gpu_memory_buffer_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -3 lines 0 comments Download
M content/common/child_process_host_impl.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/common/child_process_host_impl.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/common/child_process_messages.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -4 lines 0 comments Download
M content/common/gpu/client/gpu_channel_host.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_channel_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl.h View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl.cc View 1 2 3 4 6 7 8 1 chunk +6 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +18 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +15 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_linux.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +17 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +18 lines, -1 line 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +16 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +16 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/client/gpu_memory_buffer_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (6 generated)
alexst (slow to review)
Hi Dave, This is drafty and omitting the plumbing from GpuMemoryBufferFactoryHostImpl::DestroyGpuMemoryBuffer to GpuChannelHost::WaitForPendingGpuMemoryBufferUsageToComplete for now. ...
6 years, 2 months ago (2014-10-21 17:36:15 UTC) #3
reveman
https://codereview.chromium.org/654223006/diff/20001/content/common/gpu/client/gpu_channel_host.cc File content/common/gpu/client/gpu_channel_host.cc (right): https://codereview.chromium.org/654223006/diff/20001/content/common/gpu/client/gpu_channel_host.cc#newcode341 content/common/gpu/client/gpu_channel_host.cc:341: signal_counters_.insert(std::make_pair(id, num_proxies)); Instead of signal_counters_ and signal_tasks_ maps, could ...
6 years, 2 months ago (2014-10-21 20:27:58 UTC) #4
alexst (slow to review)
I refactored the code per your comment. It now allows the wait call to be ...
6 years, 2 months ago (2014-10-22 14:47:08 UTC) #5
reveman
https://codereview.chromium.org/654223006/diff/20001/content/common/gpu/client/gpu_channel_host.cc File content/common/gpu/client/gpu_channel_host.cc (right): https://codereview.chromium.org/654223006/diff/20001/content/common/gpu/client/gpu_channel_host.cc#newcode341 content/common/gpu/client/gpu_channel_host.cc:341: signal_counters_.insert(std::make_pair(id, num_proxies)); On 2014/10/22 14:47:08, alexst wrote: > On ...
6 years, 2 months ago (2014-10-22 16:20:09 UTC) #6
alexst (slow to review)
On 2014/10/22 16:20:09, reveman wrote: > https://codereview.chromium.org/654223006/diff/20001/content/common/gpu/client/gpu_channel_host.cc > File content/common/gpu/client/gpu_channel_host.cc (right): > > https://codereview.chromium.org/654223006/diff/20001/content/common/gpu/client/gpu_channel_host.cc#newcode341 > ...
6 years, 2 months ago (2014-10-22 16:46:54 UTC) #7
reveman
On 2014/10/22 16:46:54, alexst wrote: > On 2014/10/22 16:20:09, reveman wrote: > > > https://codereview.chromium.org/654223006/diff/20001/content/common/gpu/client/gpu_channel_host.cc ...
6 years, 2 months ago (2014-10-22 17:03:27 UTC) #8
alexst (slow to review)
On 2014/10/22 17:03:27, reveman wrote: > On 2014/10/22 16:46:54, alexst wrote: > > On 2014/10/22 ...
6 years, 2 months ago (2014-10-22 17:17:14 UTC) #9
reveman
On 2014/10/22 17:17:14, alexst wrote: > On 2014/10/22 17:03:27, reveman wrote: > > On 2014/10/22 ...
6 years, 2 months ago (2014-10-22 17:41:39 UTC) #10
alexst (slow to review)
new draft, PTAL.
6 years, 2 months ago (2014-10-22 20:02:45 UTC) #11
alexst (slow to review)
https://codereview.chromium.org/654223006/diff/60001/content/common/gpu/client/command_buffer_proxy_impl.cc File content/common/gpu/client/command_buffer_proxy_impl.cc (right): https://codereview.chromium.org/654223006/diff/60001/content/common/gpu/client/command_buffer_proxy_impl.cc#newcode276 content/common/gpu/client/command_buffer_proxy_impl.cc:276: gpu_memory_buffer_tasks_.insert(std::make_pair(sync_point, callback)); Forgot to add, these are to be ...
6 years, 2 months ago (2014-10-22 20:05:01 UTC) #12
reveman
https://codereview.chromium.org/654223006/diff/60001/content/common/gpu/client/command_buffer_proxy_impl.cc File content/common/gpu/client/command_buffer_proxy_impl.cc (right): https://codereview.chromium.org/654223006/diff/60001/content/common/gpu/client/command_buffer_proxy_impl.cc#newcode174 content/common/gpu/client/command_buffer_proxy_impl.cc:174: base::AutoLock lock(signal_lock_); Alternatively, we can make sure to only ...
6 years, 2 months ago (2014-10-22 22:42:47 UTC) #13
alexst (slow to review)
Okay, should be cleaner now, I moved most of the logic into the proxy. It ...
6 years, 2 months ago (2014-10-23 19:22:05 UTC) #14
reveman
https://codereview.chromium.org/654223006/diff/80001/content/common/gpu/client/command_buffer_proxy_impl.h File content/common/gpu/client/command_buffer_proxy_impl.h (right): https://codereview.chromium.org/654223006/diff/80001/content/common/gpu/client/command_buffer_proxy_impl.h#newcode167 content/common/gpu/client/command_buffer_proxy_impl.h:167: scoped_refptr<base::MessageLoopProxy> message_loop; I just realized that GpuChannelHost::MessageFilter already handle ...
6 years, 2 months ago (2014-10-23 19:46:43 UTC) #15
alexst (slow to review)
On 2014/10/23 19:46:43, reveman wrote: > https://codereview.chromium.org/654223006/diff/80001/content/common/gpu/client/command_buffer_proxy_impl.h > File content/common/gpu/client/command_buffer_proxy_impl.h (right): > > https://codereview.chromium.org/654223006/diff/80001/content/common/gpu/client/command_buffer_proxy_impl.h#newcode167 > ...
6 years, 2 months ago (2014-10-23 21:48:47 UTC) #16
piman
drive-by: I went through this CL, and I'm not sure this is the right approach: ...
6 years, 2 months ago (2014-10-23 23:27:43 UTC) #18
reveman
On 2014/10/23 21:48:47, alexst wrote: > On 2014/10/23 19:46:43, reveman wrote: > > > https://codereview.chromium.org/654223006/diff/80001/content/common/gpu/client/command_buffer_proxy_impl.h ...
6 years, 2 months ago (2014-10-24 00:29:45 UTC) #19
alexst (slow to review)
> I'm not fully sure what we're trying to synchronize against any more - it's ...
6 years, 2 months ago (2014-10-24 20:19:42 UTC) #20
reveman
On 2014/10/23 23:27:43, piman (Very slow to review) wrote: > drive-by: I went through this ...
6 years, 2 months ago (2014-10-24 21:33:02 UTC) #21
piman
On Fri, Oct 24, 2014 at 2:33 PM, <reveman@chromium.org> wrote: > On 2014/10/23 23:27:43, piman ...
6 years, 2 months ago (2014-10-24 22:02:39 UTC) #22
reveman
On 2014/10/24 22:02:39, piman (Very slow to review) wrote: > On Fri, Oct 24, 2014 ...
6 years, 2 months ago (2014-10-24 22:31:38 UTC) #23
alexst (slow to review)
This stashes the sync point on the GpuMemoryBufferImpl. I tried stashing the last sync point ...
6 years, 1 month ago (2014-10-30 22:37:24 UTC) #24
piman
https://codereview.chromium.org/654223006/diff/100001/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc File content/common/gpu/client/gpu_memory_buffer_impl_mac.cc (right): https://codereview.chromium.org/654223006/diff/100001/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc#newcode84 content/common/gpu/client/gpu_memory_buffer_impl_mac.cc:84: return false; true for IO_SURFACE_BUFFER? Do we really need ...
6 years, 1 month ago (2014-10-31 01:24:19 UTC) #25
reveman
https://codereview.chromium.org/654223006/diff/100001/content/common/gpu/client/command_buffer_proxy_impl.cc File content/common/gpu/client/command_buffer_proxy_impl.cc (right): https://codereview.chromium.org/654223006/diff/100001/content/common/gpu/client/command_buffer_proxy_impl.cc#newcode321 content/common/gpu/client/command_buffer_proxy_impl.cc:321: channel_->ShareGpuMemoryBufferToGpuProcess( Maybe you can pass a route_id_ or an ...
6 years, 1 month ago (2014-10-31 11:39:36 UTC) #26
alexst (slow to review)
> Can we make this: > > virtual void SetGpuMemoryBufferDestructionSyncPointCallback( > gfx::GpuMemoryBufferType type, > const ...
6 years, 1 month ago (2014-10-31 18:03:59 UTC) #27
reveman
On 2014/10/31 18:03:59, alexst wrote: > > Can we make this: > > > > ...
6 years, 1 month ago (2014-10-31 19:28:41 UTC) #28
alexst (slow to review)
> The main reason is that if we do it this way it becomes part ...
6 years, 1 month ago (2014-10-31 21:24:56 UTC) #29
reveman
On 2014/10/31 21:24:56, alexst wrote: > > The main reason is that if we do ...
6 years, 1 month ago (2014-10-31 22:22:23 UTC) #30
alexst (slow to review)
On 2014/10/31 22:22:23, reveman wrote: > On 2014/10/31 21:24:56, alexst wrote: > > > The ...
6 years, 1 month ago (2014-10-31 22:39:21 UTC) #31
piman
On Fri, Oct 31, 2014 at 3:39 PM, <alexst@chromium.org> wrote: > On 2014/10/31 22:22:23, reveman ...
6 years, 1 month ago (2014-10-31 23:56:14 UTC) #32
reveman
On 2014/10/31 23:56:14, piman (Very slow to review) wrote: > On Fri, Oct 31, 2014 ...
6 years, 1 month ago (2014-11-01 22:43:49 UTC) #33
alexst (slow to review)
PTAL Moved the decision into ShareGpuMemoryBufferToGpuProcess. https://codereview.chromium.org/654223006/diff/180001/gpu/command_buffer/client/gpu_memory_buffer_manager.h File gpu/command_buffer/client/gpu_memory_buffer_manager.h (right): https://codereview.chromium.org/654223006/diff/180001/gpu/command_buffer/client/gpu_memory_buffer_manager.h#newcode31 gpu/command_buffer/client/gpu_memory_buffer_manager.h:31: virtual void RecordDestructionSyncPoint(ClientBuffer ...
6 years, 1 month ago (2014-11-03 16:34:37 UTC) #34
piman
Cool. Couple of things. https://codereview.chromium.org/654223006/diff/180001/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc File content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc (right): https://codereview.chromium.org/654223006/diff/180001/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc#newcode70 content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc:70: sync_point); What prevents an arbitrary ...
6 years, 1 month ago (2014-11-03 19:36:35 UTC) #35
alexst (slow to review)
Thanks for the comments, new patch. https://codereview.chromium.org/654223006/diff/180001/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc File content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc (right): https://codereview.chromium.org/654223006/diff/180001/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc#newcode70 content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc:70: sync_point); On 2014/11/03 ...
6 years, 1 month ago (2014-11-03 20:29:17 UTC) #37
piman
LGTM, thanks!
6 years, 1 month ago (2014-11-03 20:39:47 UTC) #38
alexst (slow to review)
+jschuh or kenrb for owner of content/common/child_process_messages.h
6 years, 1 month ago (2014-11-03 22:07:53 UTC) #40
alexst (slow to review)
+jschuh or kenrb for owner of content/common/child_process_messages.h
6 years, 1 month ago (2014-11-03 22:07:54 UTC) #41
kenrb
ipc lgtm
6 years, 1 month ago (2014-11-03 22:08:59 UTC) #42
reveman
lgtm with nits https://codereview.chromium.org/654223006/diff/260001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc File content/browser/gpu/browser_gpu_memory_buffer_manager.cc (right): https://codereview.chromium.org/654223006/diff/260001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc#newcode119 content/browser/gpu/browser_gpu_memory_buffer_manager.cc:119: child_client_id, sync_point); nit: is this formatted ...
6 years, 1 month ago (2014-11-03 22:26:12 UTC) #43
alexst (slow to review)
I'll address the comments shortly, but as far as formatting goes, I ran it through ...
6 years, 1 month ago (2014-11-03 22:47:42 UTC) #44
alexst (slow to review)
patch
6 years, 1 month ago (2014-11-03 23:46:42 UTC) #45
reveman
still lgtm but with a few minor requests https://codereview.chromium.org/654223006/diff/280001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc File content/browser/gpu/browser_gpu_memory_buffer_manager.cc (right): https://codereview.chromium.org/654223006/diff/280001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc#newcode119 content/browser/gpu/browser_gpu_memory_buffer_manager.cc:119: child_client_id, ...
6 years, 1 month ago (2014-11-04 00:16:13 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654223006/300001
6 years, 1 month ago (2014-11-04 02:01:44 UTC) #48
commit-bot: I haz the power
Committed patchset #14 (id:300001)
6 years, 1 month ago (2014-11-04 03:01:10 UTC) #49
commit-bot: I haz the power
6 years, 1 month ago (2014-11-04 03:02:25 UTC) #50
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/2992e56e7d52e3158400980b312ecf0a8ddbfe1d
Cr-Commit-Position: refs/heads/master@{#302561}

Powered by Google App Engine
This is Rietveld 408576698