| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; | 616 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; |
| 617 GLenum target = texture_ref->texture()->target(); | 617 GLenum target = texture_ref->texture()->target(); |
| 618 gpu::gles2::TextureManager* texture_manager = | 618 gpu::gles2::TextureManager* texture_manager = |
| 619 stub_->decoder()->GetContextGroup()->texture_manager(); | 619 stub_->decoder()->GetContextGroup()->texture_manager(); |
| 620 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 620 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
| 621 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 621 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
| 622 uncleared_textures_.erase(it); | 622 uncleared_textures_.erase(it); |
| 623 } | 623 } |
| 624 | 624 |
| 625 } // namespace content | 625 } // namespace content |
| OLD | NEW |