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

Issue 7260008: Implement proper synchronization between HW video decode IPC and CommandBuffer. (Closed)

Created:
9 years, 6 months ago by Ami GONE FROM CHROMIUM
Modified:
9 years, 5 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, sjl, ddorwin+watch_chromium.org, fischman+watch_chromium.org, apatrick_chromium, joi+watch-content_chromium.org, acolwell+watch_chromium.org, annacc, darin-cc_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing), vjain, cfreeman, vhiremath
Visibility:
Public.

Description

Implement proper synchronization between HW video decode IPC and CommandBuffer. This is done by inserting tokens into the command-buffer stream when synchronization is needed, and adding a last-read/last-written token pair to each IPC message. This allowed me to remove the bogus FinishGL() calls from the gles2 sample pepper plugin. As part of this CL, the return value for VideoDecodeAccelerator::{Decode,Flush,Abort} changed from bool to void. These are all async methods so errors ought to be signaled using callbacks. BUG=none TEST=gles2 works, no crashes; trybots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90971

Patch Set 1 : . #

Total comments: 2

Patch Set 2 : . #

Patch Set 3 : fixing compilation errors from bots. #

Total comments: 39

Patch Set 4 : . #

Total comments: 18

Patch Set 5 : . #

Total comments: 13

Patch Set 6 : . #

Patch Set 7 : scherkus CR response. #

Patch Set 8 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+579 lines, -334 lines) Patch
M content/common/gpu/gpu_channel.h View 1 chunk +0 lines, -5 lines 0 comments Download
M content/common/gpu/gpu_channel.cc View 3 chunks +7 lines, -20 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 5 6 4 chunks +15 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 3 chunks +13 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 2 3 4 6 chunks +43 lines, -20 lines 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator.h View 1 2 3 4 2 chunks +53 lines, -12 lines 0 comments Download
M content/common/gpu/media/gpu_video_decode_accelerator.cc View 1 2 3 4 6 chunks +113 lines, -40 lines 0 comments Download
M content/common/gpu/media/gpu_video_service.h View 2 chunks +5 lines, -4 lines 0 comments Download
M content/common/gpu/media/gpu_video_service.cc View 1 2 3 4 chunks +24 lines, -13 lines 0 comments Download
M content/common/gpu/media/omx_video_decode_accelerator.h View 1 chunk +3 lines, -3 lines 0 comments Download
M content/common/gpu/media/omx_video_decode_accelerator.cc View 6 chunks +9 lines, -11 lines 0 comments Download
M content/common/gpu/media/omx_video_decode_accelerator_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/gpu/gpu_channel_host.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M content/renderer/gpu/gpu_video_decode_accelerator_host.h View 1 2 3 4 5 6 3 chunks +30 lines, -7 lines 0 comments Download
M content/renderer/gpu/gpu_video_decode_accelerator_host.cc View 1 2 3 4 5 6 8 chunks +59 lines, -22 lines 0 comments Download
M content/renderer/gpu/gpu_video_service_host.h View 1 2 3 4 5 6 3 chunks +19 lines, -13 lines 0 comments Download
M content/renderer/gpu/gpu_video_service_host.cc View 1 2 3 4 5 6 2 chunks +24 lines, -29 lines 0 comments Download
M content/renderer/pepper_platform_video_decoder_impl.h View 1 2 3 4 4 chunks +13 lines, -9 lines 0 comments Download
M content/renderer/pepper_platform_video_decoder_impl.cc View 1 2 3 4 4 chunks +31 lines, -73 lines 0 comments Download
M content/renderer/pepper_plugin_delegate_impl.h View 2 chunks +6 lines, -1 line 0 comments Download
M content/renderer/pepper_plugin_delegate_impl.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/common/command_buffer.h View 1 2 3 4 5 6 7 1 chunk +21 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/command_buffer.cc View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gpu_scheduler.h View 2 chunks +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gpu_scheduler.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M gpu/gpu.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/video/video_decode_accelerator.h View 1 2 3 2 chunks +3 lines, -9 lines 0 comments Download
M ppapi/examples/gles2/gles2.cc View 5 chunks +1 line, -17 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 2 chunks +3 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_video_decoder_impl.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_video_decoder_impl.cc View 1 2 3 4 8 chunks +13 lines, -13 lines 0 comments Download
M webkit/plugins/ppapi/resource_tracker.h View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Ami GONE FROM CHROMIUM
brettw: for content/{renderer,common} piman: for webkit/plugins/ppapi scherkus: please review it all.
9 years, 6 months ago (2011-06-27 17:50:29 UTC) #1
jam
http://codereview.chromium.org/7260008/diff/5001/content/common/gpu/gpu_messages.h File content/common/gpu/gpu_messages.h (right): http://codereview.chromium.org/7260008/diff/5001/content/common/gpu/gpu_messages.h#newcode22 content/common/gpu/gpu_messages.h:22: // Singly-included section, not converted. nit: the ", not ...
9 years, 6 months ago (2011-06-27 18:21:35 UTC) #2
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/7260008/diff/5001/content/common/gpu/gpu_messages.h File content/common/gpu/gpu_messages.h (right): http://codereview.chromium.org/7260008/diff/5001/content/common/gpu/gpu_messages.h#newcode22 content/common/gpu/gpu_messages.h:22: // Singly-included section, not converted. On 2011/06/27 18:21:35, John ...
9 years, 6 months ago (2011-06-27 18:43:48 UTC) #3
Ami GONE FROM CHROMIUM
9 years, 6 months ago (2011-06-27 20:44:43 UTC) #4
scherkus (not reviewing)
I haven't fully understood the token stuff, but from a high-level things are making sense ...
9 years, 6 months ago (2011-06-27 22:54:47 UTC) #5
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/7260008/diff/6031/content/common/gpu/gpu_command_buffer_stub.h File content/common/gpu/gpu_command_buffer_stub.h (right): http://codereview.chromium.org/7260008/diff/6031/content/common/gpu/gpu_command_buffer_stub.h#newcode69 content/common/gpu/gpu_command_buffer_stub.h:69: return command_buffer_.get() ? command_buffer_->GetState().token : 0; On 2011/06/27 22:54:47, ...
9 years, 6 months ago (2011-06-28 00:06:35 UTC) #6
piman
http://codereview.chromium.org/7260008/diff/6037/content/common/gpu/gpu_command_buffer_stub.cc File content/common/gpu/gpu_command_buffer_stub.cc (right): http://codereview.chromium.org/7260008/diff/6037/content/common/gpu/gpu_command_buffer_stub.cc#newcode501 content/common/gpu/gpu_command_buffer_stub.cc:501: set_token_callbacks_[i].Run(token); Can the callback remove itself ? See later ...
9 years, 6 months ago (2011-06-28 01:19:22 UTC) #7
scherkus (not reviewing)
http://codereview.chromium.org/7260008/diff/6031/content/common/gpu/gpu_messages.h File content/common/gpu/gpu_messages.h (right): http://codereview.chromium.org/7260008/diff/6031/content/common/gpu/gpu_messages.h#newcode27 content/common/gpu/gpu_messages.h:27: typedef std::pair<int32, int32> ReadWriteTokens; On 2011/06/28 00:06:35, Ami Fischman ...
9 years, 6 months ago (2011-06-28 01:22:15 UTC) #8
Ami GONE FROM CHROMIUM
Now with 85% less crack! It turns out that instead of trampolining back and forth ...
9 years, 5 months ago (2011-06-28 21:00:53 UTC) #9
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/7260008/diff/6031/content/common/gpu/gpu_messages.h File content/common/gpu/gpu_messages.h (right): http://codereview.chromium.org/7260008/diff/6031/content/common/gpu/gpu_messages.h#newcode27 content/common/gpu/gpu_messages.h:27: typedef std::pair<int32, int32> ReadWriteTokens; On 2011/06/28 01:22:15, scherkus wrote: ...
9 years, 5 months ago (2011-06-28 21:02:31 UTC) #10
piman
LGTM+nit, thanks for the cleanup it looks great. http://codereview.chromium.org/7260008/diff/6040/gpu/command_buffer/common/command_buffer.h File gpu/command_buffer/common/command_buffer.h (right): http://codereview.chromium.org/7260008/diff/6040/gpu/command_buffer/common/command_buffer.h#newcode140 gpu/command_buffer/common/command_buffer.h:140: // ...
9 years, 5 months ago (2011-06-28 21:24:41 UTC) #11
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/7260008/diff/6040/gpu/command_buffer/common/command_buffer.h File gpu/command_buffer/common/command_buffer.h (right): http://codereview.chromium.org/7260008/diff/6040/gpu/command_buffer/common/command_buffer.h#newcode140 gpu/command_buffer/common/command_buffer.h:140: // This want to be private (and const) but ...
9 years, 5 months ago (2011-06-28 21:27:38 UTC) #12
scherkus (not reviewing)
LGTM w/ misc nits http://codereview.chromium.org/7260008/diff/6040/content/common/gpu/gpu_command_buffer_stub.h File content/common/gpu/gpu_command_buffer_stub.h (right): http://codereview.chromium.org/7260008/diff/6040/content/common/gpu/gpu_command_buffer_stub.h#newcode69 content/common/gpu/gpu_command_buffer_stub.h:69: return command_buffer_.get() ? command_buffer_->GetState().token : ...
9 years, 5 months ago (2011-06-28 22:02:06 UTC) #13
scherkus (not reviewing)
LGTM w/ misc nits http://codereview.chromium.org/7260008/diff/6040/content/common/gpu/gpu_command_buffer_stub.h File content/common/gpu/gpu_command_buffer_stub.h (right): http://codereview.chromium.org/7260008/diff/6040/content/common/gpu/gpu_command_buffer_stub.h#newcode69 content/common/gpu/gpu_command_buffer_stub.h:69: return command_buffer_.get() ? command_buffer_->GetState().token : ...
9 years, 5 months ago (2011-06-28 22:02:07 UTC) #14
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/7260008/diff/6040/content/common/gpu/gpu_command_buffer_stub.h File content/common/gpu/gpu_command_buffer_stub.h (right): http://codereview.chromium.org/7260008/diff/6040/content/common/gpu/gpu_command_buffer_stub.h#newcode69 content/common/gpu/gpu_command_buffer_stub.h:69: return command_buffer_.get() ? command_buffer_->GetState().token : 0; On 2011/06/28 22:02:07, ...
9 years, 5 months ago (2011-06-28 22:25:06 UTC) #15
brettw
What part of this do you need me to look at?
9 years, 5 months ago (2011-06-29 17:28:55 UTC) #16
Ami GONE FROM CHROMIUM
On 2011/06/29 17:28:55, brettw wrote: > What part of this do you need me to ...
9 years, 5 months ago (2011-06-29 17:30:29 UTC) #17
brettw
9 years, 5 months ago (2011-06-29 17:37:28 UTC) #18
LGTM (mostly rubber stamp)

Powered by Google App Engine
This is Rietveld 408576698