| OLD | NEW |
| 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" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 if (mem && !mem->Map(size)) | 239 if (mem && !mem->Map(size)) |
| 240 return nullptr; | 240 return nullptr; |
| 241 return mem; | 241 return mem; |
| 242 } | 242 } |
| 243 | 243 |
| 244 scoped_refptr<base::SingleThreadTaskRunner> | 244 scoped_refptr<base::SingleThreadTaskRunner> |
| 245 RendererGpuVideoAcceleratorFactories::GetTaskRunner() { | 245 RendererGpuVideoAcceleratorFactories::GetTaskRunner() { |
| 246 return task_runner_; | 246 return task_runner_; |
| 247 } | 247 } |
| 248 | 248 |
| 249 media::VideoDecodeAccelerator::Capabilities |
| 250 RendererGpuVideoAcceleratorFactories::GetVideoDecodeAcceleratorCapabilities() { |
| 251 return GpuVideoAcceleratorUtil::ConvertGpuToMediaDecodeCapabilities( |
| 252 gpu_channel_host_->gpu_info().video_decode_accelerator_capabilities); |
| 253 } |
| 254 |
| 249 media::VideoDecodeAccelerator::SupportedProfiles | 255 media::VideoDecodeAccelerator::SupportedProfiles |
| 250 RendererGpuVideoAcceleratorFactories:: | 256 RendererGpuVideoAcceleratorFactories:: |
| 251 GetVideoDecodeAcceleratorSupportedProfiles() { | 257 GetVideoDecodeAcceleratorSupportedProfiles() { |
| 252 return GpuVideoAcceleratorUtil::ConvertGpuToMediaDecodeProfiles( | 258 return GpuVideoAcceleratorUtil::ConvertGpuToMediaDecodeProfiles( |
| 253 gpu_channel_host_->gpu_info() | 259 gpu_channel_host_->gpu_info() |
| 254 .video_decode_accelerator_supported_profiles); | 260 .video_decode_accelerator_capabilities.supported_profiles); |
| 255 } | 261 } |
| 256 | 262 |
| 257 media::VideoEncodeAccelerator::SupportedProfiles | 263 media::VideoEncodeAccelerator::SupportedProfiles |
| 258 RendererGpuVideoAcceleratorFactories:: | 264 RendererGpuVideoAcceleratorFactories:: |
| 259 GetVideoEncodeAcceleratorSupportedProfiles() { | 265 GetVideoEncodeAcceleratorSupportedProfiles() { |
| 260 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( | 266 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( |
| 261 gpu_channel_host_->gpu_info() | 267 gpu_channel_host_->gpu_info() |
| 262 .video_encode_accelerator_supported_profiles); | 268 .video_encode_accelerator_supported_profiles); |
| 263 } | 269 } |
| 264 | 270 |
| 265 void RendererGpuVideoAcceleratorFactories::ReleaseContextProvider() { | 271 void RendererGpuVideoAcceleratorFactories::ReleaseContextProvider() { |
| 266 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); | 272 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); |
| 267 context_provider_refptr_ = nullptr; | 273 context_provider_refptr_ = nullptr; |
| 268 } | 274 } |
| 269 | 275 |
| 270 } // namespace content | 276 } // namespace content |
| OLD | NEW |