| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 SetTextureCleared(picture); | 258 SetTextureCleared(picture); |
| 259 } else { | 259 } else { |
| 260 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 260 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
| 261 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); | 261 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); |
| 262 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); | 262 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); |
| 263 } | 263 } |
| 264 | 264 |
| 265 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady( | 265 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady( |
| 266 host_route_id_, picture.picture_buffer_id(), | 266 host_route_id_, picture.picture_buffer_id(), |
| 267 picture.bitstream_buffer_id(), picture.visible_rect(), | 267 picture.bitstream_buffer_id(), picture.visible_rect(), |
| 268 picture.allow_overlay()))) { | 268 picture.allow_overlay(), picture.size_changed()))) { |
| 269 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; | 269 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 | 272 |
| 273 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( | 273 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( |
| 274 int32_t bitstream_buffer_id) { | 274 int32_t bitstream_buffer_id) { |
| 275 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( | 275 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( |
| 276 host_route_id_, bitstream_buffer_id))) { | 276 host_route_id_, bitstream_buffer_id))) { |
| 277 DLOG(ERROR) | 277 DLOG(ERROR) |
| 278 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) " | 278 << "Send(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) " |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; | 605 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; |
| 606 GLenum target = texture_ref->texture()->target(); | 606 GLenum target = texture_ref->texture()->target(); |
| 607 gpu::gles2::TextureManager* texture_manager = | 607 gpu::gles2::TextureManager* texture_manager = |
| 608 stub_->decoder()->GetContextGroup()->texture_manager(); | 608 stub_->decoder()->GetContextGroup()->texture_manager(); |
| 609 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 609 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
| 610 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 610 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
| 611 uncleared_textures_.erase(it); | 611 uncleared_textures_.erase(it); |
| 612 } | 612 } |
| 613 | 613 |
| 614 } // namespace content | 614 } // namespace content |
| OLD | NEW |