Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 1809943002: Select BackingStrategy based on GpuPreferences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/gpu/media/android_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/media/android_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698