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

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

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dispatch GetSupportedResolution to each vda Created 5 years, 12 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/cpu.h"
6 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
7 #include "base/logging.h" 8 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
9 #include "base/stl_util.h" 10 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
11 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
12 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
13 #include "content/common/gpu/gpu_channel.h" 14 #include "content/common/gpu/gpu_channel.h"
14 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" 15 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
15 #include "media/base/bind_to_current_loop.h" 16 #include "media/base/bind_to_current_loop.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 weak_this_factory_(this) { 245 weak_this_factory_(this) {
245 weak_this_ = weak_this_factory_.GetWeakPtr(); 246 weak_this_ = weak_this_factory_.GetWeakPtr();
246 va_surface_release_cb_ = media::BindToCurrentLoop( 247 va_surface_release_cb_ = media::BindToCurrentLoop(
247 base::Bind(&VaapiVideoDecodeAccelerator::RecycleVASurfaceID, weak_this_)); 248 base::Bind(&VaapiVideoDecodeAccelerator::RecycleVASurfaceID, weak_this_));
248 } 249 }
249 250
250 VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() { 251 VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() {
251 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 252 DCHECK_EQ(message_loop_, base::MessageLoop::current());
252 } 253 }
253 254
255 // static
256 media::VideoDecodeAccelerator::SupportedResolution
wuchengli 2014/12/26 09:37:07 Move this to match the order in the header file.
henryhsu 2014/12/26 10:25:18 Done.
257 VaapiVideoDecodeAccelerator::GetSupportedResolution() {
258 media::VideoDecodeAccelerator::SupportedResolution resolution;
259 resolution.min.SetSize(16, 16);
260 base::CPU cpu;
261 // Ivy Bridge+ platforms can support more than 1920x1080.
262 if ((cpu.vendor_name() == "GenuineIntel") && cpu.model() >= 55)
263 resolution.max.SetSize(4096, 2160);
264 else
265 resolution.max.SetSize(1920, 1088);
266 return resolution;
267 }
268
254 class XFreeDeleter { 269 class XFreeDeleter {
255 public: 270 public:
256 void operator()(void* x) const { 271 void operator()(void* x) const {
257 ::XFree(x); 272 ::XFree(x);
258 } 273 }
259 }; 274 };
260 275
261 bool VaapiVideoDecodeAccelerator::InitializeFBConfig() { 276 bool VaapiVideoDecodeAccelerator::InitializeFBConfig() {
262 const int fbconfig_attr[] = { 277 const int fbconfig_attr[] = {
263 GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, 278 GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT,
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 932 DCHECK_EQ(message_loop_, base::MessageLoop::current());
918 Cleanup(); 933 Cleanup();
919 delete this; 934 delete this;
920 } 935 }
921 936
922 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { 937 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() {
923 return false; 938 return false;
924 } 939 }
925 940
926 } // namespace content 941 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698