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

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed)

Created:
7 years ago by sheu
Modified:
6 years, 11 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, penghuang+watch_chromium.org, yusukes+watch_chromium.org, nona+watch_chromium.org, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, yukishiino+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, James Su, wjia+watch_chromium.org, danakj+watch_chromium.org, miu+watch_chromium.org, danakj, piman
Visibility:
Public.

Description

Add gpu::MailboxHolder to hold state for a gpu::Mailbox gpu::Mailbox by itself can hold only a texture id, but in common usage it comes with texture target and syncpoint information for cross-context sharing. To reduce repetition of this pattern, gpu::MailboxHolder holds: * a gpu::Mailbox * a GL texture target * a syncpoint index Refactor other classes to use a gpu::MailboxHolder instead of separate gpu::Mailbox and associated state. Syncpoints are created with uint32 indices; make sure all uses of syncpoints use uint32. BUG=None TEST=local build, unittests on CrOS snow, desktop Linux Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245730

Patch Set 1 : affbc966 Initial. #

Patch Set 2 : cc2a95fe Android fixes. #

Total comments: 11

Patch Set 3 : 59031309 comments. #

Total comments: 1

Patch Set 4 : 7fe3e750 Removed gpu::MailboxHolder::ReleaseCallback. #

Patch Set 5 : c301e01d Rebase. #

Total comments: 26

Patch Set 6 : 8669f4be Comments from danakj@. #

Patch Set 7 : c6174e2c More comments. #

Patch Set 8 : 89bedb8c Reference return. #

Total comments: 1

Patch Set 9 : 7694f236 const-ify ReleaseMailboxCB #

Total comments: 3

Patch Set 10 : 2f138692 Whitespace. #

Patch Set 11 : bfbc08f8 Android clang fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+588 lines, -561 lines) Patch
M cc/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M cc/layers/delegated_frame_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/texture_layer.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +15 lines, -14 lines 0 comments Download
M cc/layers/texture_layer.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +27 lines, -23 lines 0 comments Download
M cc/layers/texture_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 13 chunks +52 lines, -35 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/release_callback.h View 1 chunk +1 line, -2 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +36 lines, -27 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 40 chunks +103 lines, -87 lines 0 comments Download
M cc/resources/single_release_callback.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/single_release_callback.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/texture_mailbox.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -25 lines 0 comments Download
M cc/resources/texture_mailbox.cc View 1 2 3 4 5 1 chunk +16 lines, -58 lines 0 comments Download
M cc/resources/texture_mailbox_deleter.h View 1 chunk +3 lines, -4 lines 0 comments Download
M cc/resources/texture_mailbox_deleter.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/transferable_resource.h View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
M cc/resources/transferable_resource.cc View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M cc/resources/video_resource_updater.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/video_resource_updater.cc View 1 2 3 4 5 chunks +9 lines, -11 lines 0 comments Download
M cc/test/fake_delegated_renderer_layer_impl.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_perftest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_context.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +19 lines, -25 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_copyrequest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_delegated.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/owned_mailbox.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -6 lines 0 comments Download
M content/browser/compositor/owned_mailbox.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/renderer_host/media/desktop_capture_device_aura.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +11 lines, -9 lines 0 comments Download
M content/browser/renderer_host/software_frame_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/common/cc_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -3 lines 0 comments Download
M content/common/cc_messages_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -10 lines 0 comments Download
M content/common/gpu/client/gl_helper.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -4 lines 0 comments Download
M content/common/gpu/client/gl_helper.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -8 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_compositing_helper.cc View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -8 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -5 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +14 lines, -18 lines 0 comments Download
M content/renderer/media/rtc_video_decoder.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -1 line 0 comments Download
M content/renderer/media/rtc_video_decoder.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +11 lines, -13 lines 0 comments Download
M content/renderer/media/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -2 lines 0 comments Download
A gpu/command_buffer/common/mailbox_holder.h View 1 2 3 4 5 1 chunk +28 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/mailbox_holder.cc View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
M gpu/command_buffer_common.gypi View 1 2 3 4 5 1 chunk +6 lines, -4 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.cc View 1 2 3 4 5 2 chunks +21 lines, -1 line 0 comments Download
M media/base/video_frame.h View 1 2 3 4 5 6 7 8 9 6 chunks +20 lines, -43 lines 0 comments Download
M media/base/video_frame.cc View 1 2 3 4 5 6 6 chunks +12 lines, -28 lines 0 comments Download
M media/base/video_frame_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +27 lines, -33 lines 0 comments Download
M media/filters/gpu_video_decoder.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 5 6 7 8 9 5 chunks +11 lines, -12 lines 0 comments Download
M webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc View 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
sheu
As discussed. danakj@: PTAL
7 years ago (2013-12-06 22:32:40 UTC) #1
sheu
It's probably most relevant just to look at gpu/command_buffer/common/mailbox.h for now; the rest of the ...
7 years ago (2013-12-06 22:35:11 UTC) #2
danakj
https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h File gpu/command_buffer/common/mailbox.h (right): https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h#newcode30 gpu/command_buffer/common/mailbox.h:30: typedef base::Callback<void(scoped_ptr<MailboxHolder>)> ReleaseCallback; At least in cc, we also ...
7 years ago (2013-12-06 22:37:03 UTC) #3
sheu
https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h File gpu/command_buffer/common/mailbox.h (right): https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h#newcode30 gpu/command_buffer/common/mailbox.h:30: typedef base::Callback<void(scoped_ptr<MailboxHolder>)> ReleaseCallback; On 2013/12/06 22:37:03, danakj wrote: > ...
7 years ago (2013-12-06 22:54:11 UTC) #4
piman
Could you also port TransferableResource to using gpu::MailboxHolder? It also has those 3 fields. It's ...
7 years ago (2013-12-06 23:29:41 UTC) #5
sheu
I was going to add the ParamTraits in the next CL with actual IPC. But ...
7 years ago (2013-12-07 01:03:50 UTC) #6
piman
https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h File gpu/command_buffer/common/mailbox.h (right): https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h#newcode30 gpu/command_buffer/common/mailbox.h:30: typedef base::Callback<void(scoped_ptr<MailboxHolder>)> ReleaseCallback; On 2013/12/07 01:03:50, sheu wrote: > ...
7 years ago (2013-12-07 01:32:33 UTC) #7
sheu
https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h File gpu/command_buffer/common/mailbox.h (right): https://chromiumcodereview.appspot.com/105743004/diff/200001/gpu/command_buffer/common/mailbox.h#newcode30 gpu/command_buffer/common/mailbox.h:30: typedef base::Callback<void(scoped_ptr<MailboxHolder>)> ReleaseCallback; On 2013/12/07 01:32:34, piman wrote: > ...
7 years ago (2013-12-07 01:44:14 UTC) #8
piman
On Fri, Dec 6, 2013 at 5:44 PM, <sheu@chromium.org> wrote: > > https://chromiumcodereview.appspot.com/105743004/diff/ > 200001/gpu/command_buffer/common/mailbox.h ...
7 years ago (2013-12-07 01:53:58 UTC) #9
sheu
Updated and rebased. PTAL
6 years, 11 months ago (2014-01-03 19:36:38 UTC) #10
danakj
LG overall https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/layers/texture_layer_unittest.cc File cc/layers/texture_layer_unittest.cc (right): https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/layers/texture_layer_unittest.cc#newcode343 cc/layers/texture_layer_unittest.cc:343: mailbox1_ = TextureMailbox(m1, 1, sync_point1_); Can you ...
6 years, 11 months ago (2014-01-06 20:13:42 UTC) #11
sheu
Updated. danakj@: PTAL https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/layers/texture_layer_unittest.cc File cc/layers/texture_layer_unittest.cc (right): https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/layers/texture_layer_unittest.cc#newcode343 cc/layers/texture_layer_unittest.cc:343: mailbox1_ = TextureMailbox(m1, 1, sync_point1_); On ...
6 years, 11 months ago (2014-01-06 22:44:43 UTC) #12
danakj
https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/layers/texture_layer_unittest.cc File cc/layers/texture_layer_unittest.cc (right): https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/layers/texture_layer_unittest.cc#newcode1835 cc/layers/texture_layer_unittest.cc:1835: mailbox.SetName( On 2014/01/06 22:44:44, sheu wrote: > On 2014/01/06 ...
6 years, 11 months ago (2014-01-06 23:28:32 UTC) #13
sheu
Updated. danakj@: PTAL https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://chromiumcodereview.appspot.com/105743004/diff/460001/cc/resources/resource_provider.cc#newcode748 cc/resources/resource_provider.cc:748: resource->mailbox.mailbox().name)); On 2014/01/06 23:28:33, danakj wrote: ...
6 years, 11 months ago (2014-01-07 01:40:58 UTC) #14
piman
LGTM once Dana is happy.
6 years, 11 months ago (2014-01-08 04:49:54 UTC) #15
danakj
LGTM thanks! https://chromiumcodereview.appspot.com/105743004/diff/1030001/media/base/video_frame.h File media/base/video_frame.h (right): https://chromiumcodereview.appspot.com/105743004/diff/1030001/media/base/video_frame.h#newcode90 media/base/video_frame.h:90: typedef base::Callback<void(gpu::MailboxHolder*)> ReleaseMailboxCB; what do you think ...
6 years, 11 months ago (2014-01-08 17:59:14 UTC) #16
sheu
More OWNERs. PTAL, thanks! enne@: webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc fischman@: media/* cevans@: content/common/cc_messages.h
6 years, 11 months ago (2014-01-08 19:25:34 UTC) #17
enne (OOO)
webkit/renderer/compositor_bindings/ lgtm
6 years, 11 months ago (2014-01-08 19:27:38 UTC) #18
Chris Evans
On 2014/01/08 19:27:38, enne wrote: > webkit/renderer/compositor_bindings/ lgtm Unless I missed something, IPC change looks ...
6 years, 11 months ago (2014-01-09 03:33:59 UTC) #19
sheu
Adding for OWNERs. scherkus@: PTAL at media/* Thanks!
6 years, 11 months ago (2014-01-13 19:09:44 UTC) #20
scherkus (not reviewing)
lgtm w/ pedantic nit https://chromiumcodereview.appspot.com/105743004/diff/1690001/media/base/video_frame.h File media/base/video_frame.h (right): https://chromiumcodereview.appspot.com/105743004/diff/1690001/media/base/video_frame.h#newcode18 media/base/video_frame.h:18: pedantic nits: remove extra line ...
6 years, 11 months ago (2014-01-13 19:25:26 UTC) #21
sheu
https://chromiumcodereview.appspot.com/105743004/diff/1690001/media/base/video_frame.h File media/base/video_frame.h (right): https://chromiumcodereview.appspot.com/105743004/diff/1690001/media/base/video_frame.h#newcode18 media/base/video_frame.h:18: On 2014/01/13 19:25:27, scherkus wrote: > pedantic nits: remove ...
6 years, 11 months ago (2014-01-13 19:28:08 UTC) #22
scherkus (not reviewing)
https://chromiumcodereview.appspot.com/105743004/diff/1690001/media/base/video_frame.h File media/base/video_frame.h (right): https://chromiumcodereview.appspot.com/105743004/diff/1690001/media/base/video_frame.h#newcode18 media/base/video_frame.h:18: On 2014/01/13 19:28:09, sheu wrote: > On 2014/01/13 19:25:27, ...
6 years, 11 months ago (2014-01-13 19:34:52 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/1830001
6 years, 11 months ago (2014-01-13 19:51:42 UTC) #24
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=213422
6 years, 11 months ago (2014-01-13 20:34:38 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2090001
6 years, 11 months ago (2014-01-14 22:43:12 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2090001
6 years, 11 months ago (2014-01-15 00:53:18 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2400001
6 years, 11 months ago (2014-01-16 20:27:00 UTC) #28
commit-bot: I haz the power
Failed to apply patch for cc/trees/layer_tree_host_unittest_context.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 11 months ago (2014-01-16 20:27:24 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2460001
6 years, 11 months ago (2014-01-17 00:46:09 UTC) #30
commit-bot: I haz the power
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_clang_dbg&number=107459
6 years, 11 months ago (2014-01-17 01:54:28 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2460001
6 years, 11 months ago (2014-01-17 01:58:16 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2850001
6 years, 11 months ago (2014-01-17 02:06:08 UTC) #33
commit-bot: I haz the power
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_clang_dbg&number=107481
6 years, 11 months ago (2014-01-17 02:56:19 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2980001
6 years, 11 months ago (2014-01-18 00:48:36 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/105743004/2870002
6 years, 11 months ago (2014-01-18 01:15:41 UTC) #36
commit-bot: I haz the power
6 years, 11 months ago (2014-01-18 02:42:28 UTC) #37
Message was sent while issue was closed.
Change committed as 245730

Powered by Google App Engine
This is Rietveld 408576698