| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 if (filter_ && io_task_runner_->BelongsToCurrentThread()) | 336 if (filter_ && io_task_runner_->BelongsToCurrentThread()) |
| 337 return filter_->SendOnIOThread(message); | 337 return filter_->SendOnIOThread(message); |
| 338 DCHECK(child_task_runner_->BelongsToCurrentThread()); | 338 DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| 339 return stub_->channel()->Send(message); | 339 return stub_->channel()->Send(message); |
| 340 } | 340 } |
| 341 | 341 |
| 342 bool GpuVideoDecodeAccelerator::Initialize( | 342 bool GpuVideoDecodeAccelerator::Initialize( |
| 343 const VideoDecodeAccelerator::Config& config) { | 343 const VideoDecodeAccelerator::Config& config) { |
| 344 DCHECK(!video_decode_accelerator_); | 344 DCHECK(!video_decode_accelerator_); |
| 345 | 345 |
| 346 if (!stub_->channel()->AddRoute(host_route_id_, stub_->stream_id(), this)) { | 346 if (!stub_->channel()->AddRoute(host_route_id_, stub_->sequence_id(), this)) { |
| 347 DLOG(ERROR) << "Initialize(): failed to add route"; | 347 DLOG(ERROR) << "Initialize(): failed to add route"; |
| 348 return false; | 348 return false; |
| 349 } | 349 } |
| 350 | 350 |
| 351 #if !defined(OS_WIN) | 351 #if !defined(OS_WIN) |
| 352 // Ensure we will be able to get a GL context at all before initializing | 352 // Ensure we will be able to get a GL context at all before initializing |
| 353 // non-Windows VDAs. | 353 // non-Windows VDAs. |
| 354 if (!make_context_current_cb_.Run()) | 354 if (!make_context_current_cb_.Run()) |
| 355 return false; | 355 return false; |
| 356 #endif | 356 #endif |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 for (auto texture_ref : it->second) { | 530 for (auto texture_ref : it->second) { |
| 531 GLenum target = texture_ref->texture()->target(); | 531 GLenum target = texture_ref->texture()->target(); |
| 532 gpu::gles2::TextureManager* texture_manager = | 532 gpu::gles2::TextureManager* texture_manager = |
| 533 stub_->decoder()->GetContextGroup()->texture_manager(); | 533 stub_->decoder()->GetContextGroup()->texture_manager(); |
| 534 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 534 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
| 535 } | 535 } |
| 536 uncleared_textures_.erase(it); | 536 uncleared_textures_.erase(it); |
| 537 } | 537 } |
| 538 | 538 |
| 539 } // namespace media | 539 } // namespace media |
| OLD | NEW |