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

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

Issue 7587004: Destroy OmxVideoDecodeAccelerator on renderer close, too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | content/common/gpu/media/omx_video_decode_accelerator.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 10 #include "base/logging.h"
(...skipping 15 matching lines...) Expand all
26 int32 host_route_id, 26 int32 host_route_id,
27 GpuCommandBufferStub* stub) 27 GpuCommandBufferStub* stub)
28 : sender_(sender), 28 : sender_(sender),
29 init_done_msg_(NULL), 29 init_done_msg_(NULL),
30 host_route_id_(host_route_id), 30 host_route_id_(host_route_id),
31 stub_(stub), 31 stub_(stub),
32 video_decode_accelerator_(NULL) { 32 video_decode_accelerator_(NULL) {
33 } 33 }
34 34
35 GpuVideoDecodeAccelerator::~GpuVideoDecodeAccelerator() { 35 GpuVideoDecodeAccelerator::~GpuVideoDecodeAccelerator() {
36 if (video_decode_accelerator_)
37 video_decode_accelerator_->Destroy();
36 } 38 }
37 39
38 bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) { 40 bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) {
39 bool handled = true; 41 bool handled = true;
40 IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAccelerator, msg) 42 IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAccelerator, msg)
41 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Decode, OnDecode) 43 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Decode, OnDecode)
42 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignPictureBuffers, 44 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_AssignPictureBuffers,
43 OnAssignPictureBuffers) 45 OnAssignPictureBuffers)
44 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_ReusePictureBuffer, 46 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_ReusePictureBuffer,
45 OnReusePictureBuffer) 47 OnReusePictureBuffer)
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 187
186 void GpuVideoDecodeAccelerator::NotifyResetDone() { 188 void GpuVideoDecodeAccelerator::NotifyResetDone() {
187 if (!Send(new AcceleratedVideoDecoderHostMsg_ResetDone(host_route_id_))) 189 if (!Send(new AcceleratedVideoDecoderHostMsg_ResetDone(host_route_id_)))
188 LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed"; 190 LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed";
189 } 191 }
190 192
191 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { 193 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) {
192 DCHECK(sender_); 194 DCHECK(sender_);
193 return sender_->Send(message); 195 return sender_->Send(message);
194 } 196 }
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/omx_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698