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

Side by Side Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.cc

Issue 317083003: Merge VideoDecodeAcceleratorImpl with VideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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/client/gpu_video_decode_accelerator_host.h" 5 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "content/common/gpu/client/gpu_channel_host.h" 10 #include "content/common/gpu/client/gpu_channel_host.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 void GpuVideoDecodeAcceleratorHost::Destroy() { 172 void GpuVideoDecodeAcceleratorHost::Destroy() {
173 DCHECK(CalledOnValidThread()); 173 DCHECK(CalledOnValidThread());
174 if (channel_) 174 if (channel_)
175 Send(new AcceleratedVideoDecoderMsg_Destroy(decoder_route_id_)); 175 Send(new AcceleratedVideoDecoderMsg_Destroy(decoder_route_id_));
176 client_ = NULL; 176 client_ = NULL;
177 delete this; 177 delete this;
178 } 178 }
179 179
180 bool GpuVideoDecodeAcceleratorHost::CanDecodeOnIOThread() {
181 NOTREACHED();
182 return false;
183 }
184
180 void GpuVideoDecodeAcceleratorHost::OnWillDeleteImpl() { 185 void GpuVideoDecodeAcceleratorHost::OnWillDeleteImpl() {
181 DCHECK(CalledOnValidThread()); 186 DCHECK(CalledOnValidThread());
182 impl_ = NULL; 187 impl_ = NULL;
183 188
184 // The CommandBufferProxyImpl is going away; error out this VDA. 189 // The CommandBufferProxyImpl is going away; error out this VDA.
185 OnChannelError(); 190 OnChannelError();
186 } 191 }
187 192
188 void GpuVideoDecodeAcceleratorHost::PostNotifyError(Error error) { 193 void GpuVideoDecodeAcceleratorHost::PostNotifyError(Error error) {
189 DCHECK(CalledOnValidThread()); 194 DCHECK(CalledOnValidThread());
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 weak_this_factory_.InvalidateWeakPtrs(); 263 weak_this_factory_.InvalidateWeakPtrs();
259 264
260 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the 265 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the
261 // last thing done on this stack! 266 // last thing done on this stack!
262 media::VideoDecodeAccelerator::Client* client = NULL; 267 media::VideoDecodeAccelerator::Client* client = NULL;
263 std::swap(client, client_); 268 std::swap(client, client_);
264 client->NotifyError(static_cast<media::VideoDecodeAccelerator::Error>(error)); 269 client->NotifyError(static_cast<media::VideoDecodeAccelerator::Error>(error));
265 } 270 }
266 271
267 } // namespace content 272 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698