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

Side by Side Diff: content/common/gpu/media/vt_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
6 6
7 #include <CoreVideo/CoreVideo.h> 7 #include <CoreVideo/CoreVideo.h>
8 #include <OpenGL/CGLIOSurface.h> 8 #include <OpenGL/CGLIOSurface.h>
9 #include <OpenGL/gl.h> 9 #include <OpenGL/gl.h>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/cpu.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/mac/mac_logging.h" 15 #include "base/mac/mac_logging.h"
15 #include "base/metrics/histogram_macros.h" 16 #include "base/metrics/histogram_macros.h"
16 #include "base/sys_byteorder.h" 17 #include "base/sys_byteorder.h"
17 #include "base/thread_task_runner_handle.h" 18 #include "base/thread_task_runner_handle.h"
18 #include "content/common/gpu/media/vt_video_decode_accelerator.h" 19 #include "content/common/gpu/media/vt_video_decode_accelerator.h"
19 #include "content/public/common/content_switches.h" 20 #include "content/public/common/content_switches.h"
20 #include "media/base/limits.h" 21 #include "media/base/limits.h"
21 #include "ui/gl/scoped_binders.h" 22 #include "ui/gl/scoped_binders.h"
22 23
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 weak_this_factory_(this) { 232 weak_this_factory_(this) {
232 DCHECK(!make_context_current_.is_null()); 233 DCHECK(!make_context_current_.is_null());
233 callback_.decompressionOutputCallback = OutputThunk; 234 callback_.decompressionOutputCallback = OutputThunk;
234 callback_.decompressionOutputRefCon = this; 235 callback_.decompressionOutputRefCon = this;
235 weak_this_ = weak_this_factory_.GetWeakPtr(); 236 weak_this_ = weak_this_factory_.GetWeakPtr();
236 } 237 }
237 238
238 VTVideoDecodeAccelerator::~VTVideoDecodeAccelerator() { 239 VTVideoDecodeAccelerator::~VTVideoDecodeAccelerator() {
239 } 240 }
240 241
242 // static
243 media::VideoDecodeAccelerator::SupportedResolution
244 VTVideoDecodeAccelerator::GetSupportedResolution() {
245 media::VideoDecodeAccelerator::SupportedResolution resolution;
246 resolution.min.SetSize(16, 16);
247 base::CPU cpu;
248 // Ivy Bridge+ platforms can support more than 1920x1080.
249 if ((cpu.vendor_name() == "GenuineIntel") && cpu.model() >= 55)
wuchengli 2014/12/26 09:37:07 Mac only uses Intel and no ARM?
henryhsu 2014/12/26 10:25:18 keep this first and wait sandersd to confirm maxim
250 resolution.max.SetSize(4096, 2160);
251 else
252 resolution.max.SetSize(1920, 1088);
253 return resolution;
254 }
255
241 bool VTVideoDecodeAccelerator::Initialize( 256 bool VTVideoDecodeAccelerator::Initialize(
242 media::VideoCodecProfile profile, 257 media::VideoCodecProfile profile,
243 Client* client) { 258 Client* client) {
244 DCHECK(gpu_thread_checker_.CalledOnValidThread()); 259 DCHECK(gpu_thread_checker_.CalledOnValidThread());
245 client_ = client; 260 client_ = client;
246 261
247 if (!InitializeVideoToolbox()) 262 if (!InitializeVideoToolbox())
248 return false; 263 return false;
249 264
250 // Only H.264 is supported. 265 // Only H.264 is supported.
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 assigned_bitstream_ids_.clear(); 927 assigned_bitstream_ids_.clear();
913 state_ = STATE_DESTROYING; 928 state_ = STATE_DESTROYING;
914 QueueFlush(TASK_DESTROY); 929 QueueFlush(TASK_DESTROY);
915 } 930 }
916 931
917 bool VTVideoDecodeAccelerator::CanDecodeOnIOThread() { 932 bool VTVideoDecodeAccelerator::CanDecodeOnIOThread() {
918 return false; 933 return false;
919 } 934 }
920 935
921 } // namespace content 936 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698