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

Issue 159263004: Remove threading from GpuVideoAcceleratorFactories (Closed)

Created:
6 years, 10 months ago by sheu
Modified:
6 years, 10 months ago
Reviewers:
jamesr
CC:
chromium-reviews, hclam+watch_chromium.org, pwestin+watch_google.com, mikhal+watch_chromium.org, fischman+watch_chromium.org, jasonroberts+watch_google.com, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, hguihot+watch_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, hubbe+watch_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

(reland) Remove threading from GpuVideoAcceleratorFactories This change removes all the threading considerations from GpuVideoAcceleratorFactories (and its implementation, RendererGpuVideoAcceleratorFactories). Most notably, it removes Abort() and associated functions and state. And with the removal of Abort() and friends, we can also remove its Clone() interface. All of the previously abortable operations on the RGVAF (with the exception of ReadPixels()) can be made non-abortable, with no functional difference, due to the way the users of RGVAF function. These three users are WebMediaPlayerImpl/GpuVideoDecoder, RTCVideoDecoder, and RTCVideoEncoder, and they can be made non-abortable because: WebMediaPlayerImpl/GpuVideoDecoder: * Abort() is called from WebMediaPlayerImpl::Destroy(). It has no effect, as: * All the RGVAF entry points are called from the the RGVAF message loop from GpuVideoDecoder (except for ReadPixels()), so the Abort() has no effect on them. RTCVideoDecoder: * Abort() is called from RTCVideoDecoder::WillDestroyCurrentMessageLoop() for the RGVAF message loop. It has no effect, as: * Amost all the RGVAF entry points are called from the RGVAF message loop (except for ReadPixels()), so Abort() has no effect on them. * The other exception is CreateVideoDecodeAccelerator(), which is called from RTC's main thread. But as the Abort() is called from WillDestroyCurrentMessageLoop() for the RGVAF message loop itself, it is guaranteed to occur after any tasks posted to the RGVAF message loop by CreateVideoDecodeAccelerator() has completed, and so the Abort() has no effect. RTCVideoEncoder: * Abort() is called from RTCVideoDecoder::Release(). It has no effect, as: * All the RGVAF entry points are called from the RGVAF message loop. The only functional difference remaining is that making ReadPixels() non-abortable. This is preferable, as as long as a completed video accelerator texture is available, it should be readable. We also specify that all calls to ReadPixels must be made on the RGVAF message loop, like all other entry points, and leave it up to the users of ReadPixels() to handle thread trampolining if necessary. This is a reland with one change after a revert of a revert of a revert of a revert of a revert of r247480. (WE NEED TO GO DEEPER) BUG=306333 TEST=local build, run on CrOS snow; build, run unittests on desktop Linux TBR=wuchengli@chromium.org, fischman@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250672

Patch Set 1 : 252ca81e Rebase of last version. #

Patch Set 2 : 0f7ba9fd NULL pointer fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -308 lines) Patch
M content/renderer/media/renderer_gpu_video_accelerator_factories.h View 5 chunks +5 lines, -44 lines 0 comments Download
M content/renderer/media/renderer_gpu_video_accelerator_factories.cc View 7 chunks +21 lines, -135 lines 0 comments Download
M content/renderer/media/rtc_video_decoder.h View 7 chunks +6 lines, -10 lines 0 comments Download
M content/renderer/media/rtc_video_decoder.cc View 9 chunks +49 lines, -41 lines 0 comments Download
M content/renderer/media/rtc_video_decoder_factory.h View 2 chunks +7 lines, -4 lines 0 comments Download
M content/renderer/media/rtc_video_decoder_factory.cc View 2 chunks +3 lines, -7 lines 0 comments Download
M content/renderer/media/rtc_video_decoder_unittest.cc View 3 chunks +6 lines, -12 lines 0 comments Download
M content/renderer/media/rtc_video_encoder.h View 3 chunks +8 lines, -4 lines 0 comments Download
M content/renderer/media/rtc_video_encoder.cc View 6 chunks +5 lines, -10 lines 0 comments Download
M content/renderer/media/rtc_video_encoder_factory.h View 3 chunks +8 lines, -4 lines 0 comments Download
M content/renderer/media/rtc_video_encoder_factory.cc View 3 chunks +3 lines, -6 lines 0 comments Download
M content/renderer/media/webmediaplayer_impl.cc View 1 chunk +1 line, -4 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 chunks +11 lines, -2 lines 0 comments Download
M media/cast/test/fake_gpu_video_accelerator_factories.h View 1 chunk +2 lines, -6 lines 0 comments Download
M media/cast/test/fake_gpu_video_accelerator_factories.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M media/filters/gpu_video_accelerator_factories.h View 3 chunks +9 lines, -9 lines 0 comments Download
M media/filters/gpu_video_decoder.cc View 5 chunks +31 lines, -5 lines 0 comments Download
M media/filters/mock_gpu_video_accelerator_factories.h View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
sheu
Alrighty, so this version comes with an actual change. jamesr@: PTAL at content/renderer/render_thread_impl.cc. You can ...
6 years, 10 months ago (2014-02-10 23:18:19 UTC) #1
sheu
Continued from above comment: the one change here is indeed a bug. The previous reverts ...
6 years, 10 months ago (2014-02-10 23:23:07 UTC) #2
sheu
Actually adding jamesr@ now. Please take a look at my previous comments -- thanks!
6 years, 10 months ago (2014-02-11 19:55:21 UTC) #3
jamesr
updated render_thread_impl.cc lgtm, I didn't look at the rest.
6 years, 10 months ago (2014-02-11 23:31:47 UTC) #4
sheu
The CQ bit was checked by sheu@chromium.org
6 years, 10 months ago (2014-02-11 23:47:44 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/159263004/20001
6 years, 10 months ago (2014-02-11 23:48:33 UTC) #6
commit-bot: I haz the power
6 years, 10 months ago (2014-02-12 10:59:14 UTC) #7
Message was sent while issue was closed.
Change committed as 250672

Powered by Google App Engine
This is Rietveld 408576698