| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady( |
| 268 host_route_id_, picture.picture_buffer_id(), | 268 host_route_id_, picture.picture_buffer_id(), |
| 269 picture.bitstream_buffer_id(), picture.visible_rect(), | 269 picture.bitstream_buffer_id(), picture.visible_rect(), |
| 270 picture.allow_overlay(), picture.size_changed()))) { | 270 picture.color_space(), |
| 271 std::pair<bool, bool>(picture.allow_overlay(), |
| 272 picture.size_changed())))) { |
| 271 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; | 273 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; |
| 272 } | 274 } |
| 273 } | 275 } |
| 274 | 276 |
| 275 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( | 277 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( |
| 276 int32_t bitstream_buffer_id) { | 278 int32_t bitstream_buffer_id) { |
| 277 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( | 279 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( |
| 278 host_route_id_, bitstream_buffer_id))) { | 280 host_route_id_, bitstream_buffer_id))) { |
| 279 DLOG(ERROR) | 281 DLOG(ERROR) |
| 280 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) " | 282 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) " |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 GLenum target = texture_ref->texture()->target(); | 516 GLenum target = texture_ref->texture()->target(); |
| 515 gpu::gles2::TextureManager* texture_manager = | 517 gpu::gles2::TextureManager* texture_manager = |
| 516 stub_->decoder()->GetContextGroup()->texture_manager(); | 518 stub_->decoder()->GetContextGroup()->texture_manager(); |
| 517 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 519 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
| 518 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 520 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
| 519 } | 521 } |
| 520 uncleared_textures_.erase(it); | 522 uncleared_textures_.erase(it); |
| 521 } | 523 } |
| 522 | 524 |
| 523 } // namespace media | 525 } // namespace media |
| OLD | NEW |