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/location.h" | 10 #include "base/location.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 #endif | 176 #endif |
177 #if defined(ARCH_CPU_X86_FAMILY) | 177 #if defined(ARCH_CPU_X86_FAMILY) |
178 vda_profiles = VaapiVideoDecodeAccelerator::GetSupportedProfiles(); | 178 vda_profiles = VaapiVideoDecodeAccelerator::GetSupportedProfiles(); |
179 GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( | 179 GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( |
180 vda_profiles, &capabilities.supported_profiles); | 180 vda_profiles, &capabilities.supported_profiles); |
181 #endif | 181 #endif |
182 #elif defined(OS_MACOSX) | 182 #elif defined(OS_MACOSX) |
183 capabilities.supported_profiles = | 183 capabilities.supported_profiles = |
184 VTVideoDecodeAccelerator::GetSupportedProfiles(); | 184 VTVideoDecodeAccelerator::GetSupportedProfiles(); |
185 #elif defined(OS_ANDROID) | 185 #elif defined(OS_ANDROID) |
186 capabilities = AndroidVideoDecodeAccelerator::GetCapabilities(); | 186 capabilities = |
| 187 AndroidVideoDecodeAccelerator::GetCapabilities(gpu_preferences); |
187 #endif | 188 #endif |
188 return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeCapabilities( | 189 return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeCapabilities( |
189 capabilities); | 190 capabilities); |
190 } | 191 } |
191 | 192 |
192 bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) { | 193 bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) { |
193 if (!video_decode_accelerator_) | 194 if (!video_decode_accelerator_) |
194 return false; | 195 return false; |
195 | 196 |
196 bool handled = true; | 197 bool handled = true; |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; | 625 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; |
625 GLenum target = texture_ref->texture()->target(); | 626 GLenum target = texture_ref->texture()->target(); |
626 gpu::gles2::TextureManager* texture_manager = | 627 gpu::gles2::TextureManager* texture_manager = |
627 stub_->decoder()->GetContextGroup()->texture_manager(); | 628 stub_->decoder()->GetContextGroup()->texture_manager(); |
628 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 629 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
629 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 630 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
630 uncleared_textures_.erase(it); | 631 uncleared_textures_.erase(it); |
631 } | 632 } |
632 | 633 |
633 } // namespace content | 634 } // namespace content |
OLD | NEW |