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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 311943002: Same shutdown process for content_browsertests on android/non android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another merge attempt. Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « content/browser/media/webrtc_browsertest.cc ('k') | content/gpu/in_process_gpu_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // So we have to wait for the RemoveFilter callback here instead and remove 452 // So we have to wait for the RemoveFilter callback here instead and remove
453 // the VDA after it arrives and before returning. 453 // the VDA after it arrives and before returning.
454 if (filter_.get()) { 454 if (filter_.get()) {
455 stub_->channel()->RemoveFilter(filter_.get()); 455 stub_->channel()->RemoveFilter(filter_.get());
456 filter_removed_.Wait(); 456 filter_removed_.Wait();
457 } 457 }
458 458
459 stub_->channel()->RemoveRoute(host_route_id_); 459 stub_->channel()->RemoveRoute(host_route_id_);
460 stub_->RemoveDestructionObserver(this); 460 stub_->RemoveDestructionObserver(this);
461 461
462 video_decode_accelerator_.reset();
462 delete this; 463 delete this;
463 } 464 }
464 465
465 void GpuVideoDecodeAccelerator::SetTextureCleared( 466 void GpuVideoDecodeAccelerator::SetTextureCleared(
466 const media::Picture& picture) { 467 const media::Picture& picture) {
467 DCHECK(child_message_loop_->BelongsToCurrentThread()); 468 DCHECK(child_message_loop_->BelongsToCurrentThread());
468 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); 469 DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
469 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> >::iterator it; 470 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> >::iterator it;
470 it = uncleared_textures_.find(picture.picture_buffer_id()); 471 it = uncleared_textures_.find(picture.picture_buffer_id());
471 if (it == uncleared_textures_.end()) 472 if (it == uncleared_textures_.end())
(...skipping 15 matching lines...) Expand all
487 return stub_->channel()->Send(message); 488 return stub_->channel()->Send(message);
488 } 489 }
489 490
490 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 491 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
491 bool succeeded) { 492 bool succeeded) {
492 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 493 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
493 Send(message); 494 Send(message);
494 } 495 }
495 496
496 } // namespace content 497 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_browsertest.cc ('k') | content/gpu/in_process_gpu_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698