| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); | 267 DCHECK_EQ(0u, uncleared_textures_.count(picture.picture_buffer_id())); |
| 268 } | 268 } |
| 269 | 269 |
| 270 AcceleratedVideoDecoderHostMsg_PictureReady_Params params; | 270 AcceleratedVideoDecoderHostMsg_PictureReady_Params params; |
| 271 params.picture_buffer_id = picture.picture_buffer_id(); | 271 params.picture_buffer_id = picture.picture_buffer_id(); |
| 272 params.bitstream_buffer_id = picture.bitstream_buffer_id(); | 272 params.bitstream_buffer_id = picture.bitstream_buffer_id(); |
| 273 params.visible_rect = picture.visible_rect(); | 273 params.visible_rect = picture.visible_rect(); |
| 274 params.color_space = picture.color_space(); | 274 params.color_space = picture.color_space(); |
| 275 params.allow_overlay = picture.allow_overlay(); | 275 params.allow_overlay = picture.allow_overlay(); |
| 276 params.size_changed = picture.size_changed(); | 276 params.size_changed = picture.size_changed(); |
| 277 params.surface_texture = picture.surface_texture(); |
| 277 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady(host_route_id_, | 278 if (!Send(new AcceleratedVideoDecoderHostMsg_PictureReady(host_route_id_, |
| 278 params))) { | 279 params))) { |
| 279 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; | 280 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed"; |
| 280 } | 281 } |
| 281 } | 282 } |
| 282 | 283 |
| 283 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( | 284 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer( |
| 284 int32_t bitstream_buffer_id) { | 285 int32_t bitstream_buffer_id) { |
| 285 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( | 286 if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed( |
| 286 host_route_id_, bitstream_buffer_id))) { | 287 host_route_id_, bitstream_buffer_id))) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 for (auto texture_ref : it->second) { | 527 for (auto texture_ref : it->second) { |
| 527 GLenum target = texture_ref->texture()->target(); | 528 GLenum target = texture_ref->texture()->target(); |
| 528 gpu::gles2::TextureManager* texture_manager = | 529 gpu::gles2::TextureManager* texture_manager = |
| 529 stub_->decoder()->GetContextGroup()->texture_manager(); | 530 stub_->decoder()->GetContextGroup()->texture_manager(); |
| 530 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 531 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
| 531 } | 532 } |
| 532 uncleared_textures_.erase(it); | 533 uncleared_textures_.erase(it); |
| 533 } | 534 } |
| 534 | 535 |
| 535 } // namespace media | 536 } // namespace media |
| OLD | NEW |