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

Unified Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.cc

Issue 170843004: Pass Client pointer in Initialize() for VDA/VEA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 50e826de Rebase. Created 6 years, 10 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
Index: content/common/gpu/client/gpu_video_decode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
index 403d2961cd3c6f60f76fd5f1a14218ebae758f34..1146258bac251799d8c2fddf66e1b270993e36a6 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -23,14 +23,12 @@ namespace content {
GpuVideoDecodeAcceleratorHost::GpuVideoDecodeAcceleratorHost(
GpuChannelHost* channel,
int32 decoder_route_id,
- VideoDecodeAccelerator::Client* client,
CommandBufferProxyImpl* impl)
: channel_(channel),
decoder_route_id_(decoder_route_id),
- client_(client),
+ client_(NULL),
impl_(impl) {
DCHECK(channel_);
- DCHECK(client_);
channel_->AddRoute(decoder_route_id, base::AsWeakPtr(this));
impl_->AddDeletionObserver(this);
}
@@ -72,9 +70,9 @@ bool GpuVideoDecodeAcceleratorHost::OnMessageReceived(const IPC::Message& msg) {
return handled;
}
-bool GpuVideoDecodeAcceleratorHost::Initialize(
- media::VideoCodecProfile profile) {
- NOTREACHED();
+bool GpuVideoDecodeAcceleratorHost::Initialize(media::VideoCodecProfile profile,
+ Client* client) {
+ client_ = client;
return true;
}
@@ -149,7 +147,6 @@ void GpuVideoDecodeAcceleratorHost::OnWillDeleteImpl() {
GpuVideoDecodeAcceleratorHost::~GpuVideoDecodeAcceleratorHost() {
DCHECK(CalledOnValidThread());
- DCHECK(!client_) << "destructor called without Destroy being called!";
if (channel_)
channel_->RemoveRoute(decoder_route_id_);

Powered by Google App Engine
This is Rietveld 408576698