| OLD | NEW |
| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // thread when a picture buffer is delivered the first time. | 208 // thread when a picture buffer is delivered the first time. |
| 209 if (child_message_loop_->BelongsToCurrentThread()) { | 209 if (child_message_loop_->BelongsToCurrentThread()) { |
| 210 SetTextureCleared(picture); | 210 SetTextureCleared(picture); |
| 211 } else { | 211 } else { |
| 212 DCHECK(io_message_loop_->BelongsToCurrentThread()); | 212 DCHECK(io_message_loop_->BelongsToCurrentThread()); |
| 213 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); | 213 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); |
| 214 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); | 214 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); |
| 215 } | 215 } |
| 216 | 216 |
| 217 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady( | 217 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady( |
| 218 host_route_id_, | 218 host_route_id_, picture.picture_buffer_id(), |
| 219 picture.picture_buffer_id(), | 219 picture.bitstream_buffer_id(), picture.visible_rect(), |
| 220 picture.bitstream_buffer_id(), | 220 picture.allow_overlay()))) { |
| 221 picture.visible_rect()))) { | |
| 222 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; | 221 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; |
| 223 } | 222 } |
| 224 } | 223 } |
| 225 | 224 |
| 226 void GpuVideoDecodeAccelerator::NotifyError( | 225 void GpuVideoDecodeAccelerator::NotifyError( |
| 227 media::VideoDecodeAccelerator::Error error) { | 226 media::VideoDecodeAccelerator::Error error) { |
| 228 if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification( | 227 if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification( |
| 229 host_route_id_, error))) { | 228 host_route_id_, error))) { |
| 230 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) " | 229 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) " |
| 231 << "failed"; | 230 << "failed"; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 return stub_->channel()->Send(message); | 577 return stub_->channel()->Send(message); |
| 579 } | 578 } |
| 580 | 579 |
| 581 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 580 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
| 582 bool succeeded) { | 581 bool succeeded) { |
| 583 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 582 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
| 584 Send(message); | 583 Send(message); |
| 585 } | 584 } |
| 586 | 585 |
| 587 } // namespace content | 586 } // namespace content |
| OLD | NEW |