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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 10918172: Remove VideoDecoder::PrepareForShutdownHack() and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 40af5a3b777904ce9d179dca9dfa5d7eb019ec19..149631d03611f0a1c19817b4075c43b7318947c0 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -56,7 +56,6 @@ GpuVideoDecoder::GpuVideoDecoder(
decoder_texture_target_(0),
next_picture_buffer_id_(0),
next_bitstream_buffer_id_(0),
- shutting_down_(false),
error_occured_(false) {
DCHECK(!message_loop_factory_cb_.is_null());
DCHECK(factories_);
@@ -86,14 +85,7 @@ void GpuVideoDecoder::Reset(const base::Closure& closure) {
if (!pending_read_cb_.is_null())
EnqueueFrameAndTriggerFrameDelivery(VideoFrame::CreateEmptyFrame());
- if (shutting_down_) {
- // Immediately fire the callback instead of waiting for the reset to
- // complete (which will happen after PipelineImpl::Stop() completes).
- gvd_loop_proxy_->PostTask(FROM_HERE, closure);
- } else {
- pending_reset_cb_ = closure;
- }
-
+ pending_reset_cb_ = closure;
vda_loop_proxy_->PostTask(FROM_HERE, base::Bind(
&VideoDecodeAccelerator::Reset, weak_vda_));
}
@@ -309,15 +301,6 @@ bool GpuVideoDecoder::HasAlpha() const {
return true;
}
-void GpuVideoDecoder::PrepareForShutdownHack() {
- if (!gvd_loop_proxy_->BelongsToCurrentThread()) {
- gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind(
- &GpuVideoDecoder::PrepareForShutdownHack, this));
- return;
- }
- shutting_down_ = true;
-}
-
void GpuVideoDecoder::NotifyInitializeDone() {
NOTREACHED() << "GpuVideoDecodeAcceleratorHost::Initialize is synchronous!";
}
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/filters/video_renderer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698