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

Side by Side Diff: content/renderer/media/renderer_gpu_video_accelerator_factories.cc

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/media/renderer_gpu_video_accelerator_factories.h" 5 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "content/child/child_thread.h" 11 #include "content/child/child_thread.h"
12 #include "content/common/gpu/client/context_provider_command_buffer.h" 12 #include "content/common/gpu/client/context_provider_command_buffer.h"
13 #include "content/common/gpu/client/gl_helper.h" 13 #include "content/common/gpu/client/gl_helper.h"
14 #include "content/common/gpu/client/gpu_channel_host.h" 14 #include "content/common/gpu/client/gpu_channel_host.h"
15 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
15 #include "content/common/gpu/client/gpu_video_encode_accelerator_host.h" 16 #include "content/common/gpu/client/gpu_video_encode_accelerator_host.h"
16 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 17 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
17 #include "content/renderer/render_thread_impl.h" 18 #include "content/renderer/render_thread_impl.h"
18 #include "gpu/command_buffer/client/gles2_implementation.h" 19 #include "gpu/command_buffer/client/gles2_implementation.h"
19 #include "media/video/video_decode_accelerator.h" 20 #include "media/video/video_decode_accelerator.h"
20 #include "media/video/video_encode_accelerator.h" 21 #include "media/video/video_encode_accelerator.h"
21 #include "third_party/skia/include/core/SkBitmap.h" 22 #include "third_party/skia/include/core/SkBitmap.h"
22 #include "third_party/skia/include/core/SkPixelRef.h" 23 #include "third_party/skia/include/core/SkPixelRef.h"
23 24
24 namespace content { 25 namespace content {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (mem && !mem->Map(size)) 244 if (mem && !mem->Map(size))
244 return nullptr; 245 return nullptr;
245 return mem; 246 return mem;
246 } 247 }
247 248
248 scoped_refptr<base::SingleThreadTaskRunner> 249 scoped_refptr<base::SingleThreadTaskRunner>
249 RendererGpuVideoAcceleratorFactories::GetTaskRunner() { 250 RendererGpuVideoAcceleratorFactories::GetTaskRunner() {
250 return task_runner_; 251 return task_runner_;
251 } 252 }
252 253
254 media::VideoDecodeAccelerator::SupportedResolution
255 RendererGpuVideoAcceleratorFactories::ConvertGpuToMediaResolution(
256 const gpu::VideoDecodeAcceleratorSupportedResolution& gpu_resolution) {
257 media::VideoDecodeAccelerator::SupportedResolution resolution;
258 resolution.max = gpu_resolution.max;
259 resolution.min = gpu_resolution.min;
260 return resolution;
261 }
262
263 media::VideoDecodeAccelerator::SupportedResolution
264 RendererGpuVideoAcceleratorFactories::
265 GetVideoDecodeAcceleratorSupportedResolution() {
266 return ConvertGpuToMediaResolution( gpu_channel_host_->gpu_info()
wuchengli 2014/12/22 09:39:24 Both GetVideoDecodeAcceleratorSupportedResolution
henryhsu 2014/12/23 02:52:37 Done.
267 .video_decode_accelerator_supported_resolution);
268 }
269
253 std::vector<media::VideoEncodeAccelerator::SupportedProfile> 270 std::vector<media::VideoEncodeAccelerator::SupportedProfile>
254 RendererGpuVideoAcceleratorFactories:: 271 RendererGpuVideoAcceleratorFactories::
255 GetVideoEncodeAcceleratorSupportedProfiles() { 272 GetVideoEncodeAcceleratorSupportedProfiles() {
256 return GpuVideoEncodeAcceleratorHost::ConvertGpuToMediaProfiles( 273 return GpuVideoEncodeAcceleratorHost::ConvertGpuToMediaProfiles(
257 gpu_channel_host_->gpu_info() 274 gpu_channel_host_->gpu_info()
258 .video_encode_accelerator_supported_profiles); 275 .video_encode_accelerator_supported_profiles);
259 } 276 }
260 277
261 } // namespace content 278 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698