| 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 } | 364 } |
| 365 | 365 |
| 366 const gpu::GpuDriverBugWorkarounds& gpu_workarounds = | 366 const gpu::GpuDriverBugWorkarounds& gpu_workarounds = |
| 367 stub_->channel()->gpu_channel_manager()->gpu_driver_bug_workarounds(); | 367 stub_->channel()->gpu_channel_manager()->gpu_driver_bug_workarounds(); |
| 368 const gpu::GpuPreferences& gpu_preferences = | 368 const gpu::GpuPreferences& gpu_preferences = |
| 369 stub_->channel()->gpu_channel_manager()->gpu_preferences(); | 369 stub_->channel()->gpu_channel_manager()->gpu_preferences(); |
| 370 video_decode_accelerator_ = | 370 video_decode_accelerator_ = |
| 371 vda_factory->CreateVDA(this, config, gpu_workarounds, gpu_preferences); | 371 vda_factory->CreateVDA(this, config, gpu_workarounds, gpu_preferences); |
| 372 if (!video_decode_accelerator_) { | 372 if (!video_decode_accelerator_) { |
| 373 LOG(ERROR) << "HW video decode not available for profile " << config.profile | 373 LOG(ERROR) << "HW video decode not available for profile " << config.profile |
| 374 << (config.is_encrypted ? " with encryption" : ""); | 374 << (config.is_encrypted() ? " with encryption" : ""); |
| 375 return false; | 375 return false; |
| 376 } | 376 } |
| 377 | 377 |
| 378 // Attempt to set up performing decoding tasks on IO thread, if supported by | 378 // Attempt to set up performing decoding tasks on IO thread, if supported by |
| 379 // the VDA. | 379 // the VDA. |
| 380 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread( | 380 if (video_decode_accelerator_->TryToSetupDecodeOnSeparateThread( |
| 381 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) { | 381 weak_factory_for_io_.GetWeakPtr(), io_task_runner_)) { |
| 382 filter_ = new MessageFilter(this, host_route_id_); | 382 filter_ = new MessageFilter(this, host_route_id_); |
| 383 stub_->channel()->AddFilter(filter_.get()); | 383 stub_->channel()->AddFilter(filter_.get()); |
| 384 } | 384 } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 for (auto texture_ref : it->second) { | 526 for (auto texture_ref : it->second) { |
| 527 GLenum target = texture_ref->texture()->target(); | 527 GLenum target = texture_ref->texture()->target(); |
| 528 gpu::gles2::TextureManager* texture_manager = | 528 gpu::gles2::TextureManager* texture_manager = |
| 529 stub_->decoder()->GetContextGroup()->texture_manager(); | 529 stub_->decoder()->GetContextGroup()->texture_manager(); |
| 530 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 530 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
| 531 } | 531 } |
| 532 uncleared_textures_.erase(it); | 532 uncleared_textures_.erase(it); |
| 533 } | 533 } |
| 534 | 534 |
| 535 } // namespace media | 535 } // namespace media |
| OLD | NEW |