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 "media/gpu/ipc/service/gpu_video_decode_accelerator.h" | 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // the child thread. VDA is responsible to call PictureReady on the child | 257 // the child thread. VDA is responsible to call PictureReady on the child |
258 // thread when a picture buffer is delivered the first time. | 258 // thread when a picture buffer is delivered the first time. |
259 if (child_task_runner_->BelongsToCurrentThread()) { | 259 if (child_task_runner_->BelongsToCurrentThread()) { |
260 SetTextureCleared(picture); | 260 SetTextureCleared(picture); |
261 } else { | 261 } else { |
262 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 262 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
263 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); | 263 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); |
264 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); | 264 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); |
265 } | 265 } |
266 | 266 |
267 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady( | 267 AcceleratedVideoDecoderHostMsg_PictureReady_Params params; |
268 host_route_id_, picture.picture_buffer_id(), | 268 params.picture_buffer_id = picture.picture_buffer_id(); |
269 picture.bitstream_buffer_id(), picture.visible_rect(), | 269 params.bitstream_buffer_id = picture.bitstream_buffer_id(); |
270 picture.allow_overlay(), picture.size_changed()))) { | 270 params.visible_rect = picture.visible_rect(); |
| 271 params.color_space = picture.color_space(); |
| 272 params.allow_overlay = picture.allow_overlay(); |
| 273 params.size_changed = picture.size_changed(); |
| 274 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady(host_route_id_, |
| 275 params))) { |
271 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; | 276 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; |
272 } | 277 } |
273 } | 278 } |
274 | 279 |
275 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( | 280 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( |
276 int32_t bitstream_buffer_id) { | 281 int32_t bitstream_buffer_id) { |
277 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( | 282 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( |
278 host_route_id_, bitstream_buffer_id))) { | 283 host_route_id_, bitstream_buffer_id))) { |
279 DLOG(ERROR) | 284 DLOG(ERROR) |
280 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) " | 285 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) " |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 GLenum target = texture_ref->texture()->target(); | 519 GLenum target = texture_ref->texture()->target(); |
515 gpu::gles2::TextureManager* texture_manager = | 520 gpu::gles2::TextureManager* texture_manager = |
516 stub_->decoder()->GetContextGroup()->texture_manager(); | 521 stub_->decoder()->GetContextGroup()->texture_manager(); |
517 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 522 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
518 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 523 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
519 } | 524 } |
520 uncleared_textures_.erase(it); | 525 uncleared_textures_.erase(it); |
521 } | 526 } |
522 | 527 |
523 } // namespace media | 528 } // namespace media |
OLD | NEW |