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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
52 unsigned image_texture_target, | 52 unsigned image_texture_target, |
53 bool enable_video_accelerator) | 53 bool enable_video_accelerator) |
54 : task_runner_(task_runner), | 54 : task_runner_(task_runner), |
55 gpu_channel_host_(gpu_channel_host), | 55 gpu_channel_host_(gpu_channel_host), |
56 context_provider_(context_provider), | 56 context_provider_(context_provider), |
57 image_texture_target_(image_texture_target), | 57 image_texture_target_(image_texture_target), |
58 video_accelerator_enabled_(enable_video_accelerator), | 58 video_accelerator_enabled_(enable_video_accelerator), |
59 gpu_memory_buffer_manager_( | 59 gpu_memory_buffer_manager_( |
60 ChildThreadImpl::current()->gpu_memory_buffer_manager()), | 60 ChildThreadImpl::current()->gpu_memory_buffer_manager()), |
61 thread_safe_sender_(ChildThreadImpl::current()->thread_safe_sender()) { | 61 thread_safe_sender_(ChildThreadImpl::current()->thread_safe_sender()) { |
62 DCHECK(gpu_channel_host_.get()); | |
jochen (gone - plz use gerrit)
2015/07/21 14:12:58
did you mean to make this a CHECK()?
sandersd (OOO until July 31)
2015/07/21 17:29:57
I meant it more as documentation here.
| |
62 } | 63 } |
63 | 64 |
64 RendererGpuVideoAcceleratorFactories::~RendererGpuVideoAcceleratorFactories() {} | 65 RendererGpuVideoAcceleratorFactories::~RendererGpuVideoAcceleratorFactories() {} |
65 | 66 |
66 void RendererGpuVideoAcceleratorFactories::BindContext() { | 67 void RendererGpuVideoAcceleratorFactories::BindContext() { |
67 DCHECK(task_runner_->BelongsToCurrentThread()); | 68 DCHECK(task_runner_->BelongsToCurrentThread()); |
68 if (!context_provider_->BindToCurrentThread()) | 69 if (!context_provider_->BindToCurrentThread()) |
69 context_provider_ = NULL; | 70 context_provider_ = NULL; |
70 } | 71 } |
71 | 72 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
265 | 266 |
266 media::VideoEncodeAccelerator::SupportedProfiles | 267 media::VideoEncodeAccelerator::SupportedProfiles |
267 RendererGpuVideoAcceleratorFactories:: | 268 RendererGpuVideoAcceleratorFactories:: |
268 GetVideoEncodeAcceleratorSupportedProfiles() { | 269 GetVideoEncodeAcceleratorSupportedProfiles() { |
269 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( | 270 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( |
270 gpu_channel_host_->gpu_info() | 271 gpu_channel_host_->gpu_info() |
271 .video_encode_accelerator_supported_profiles); | 272 .video_encode_accelerator_supported_profiles); |
272 } | 273 } |
273 | 274 |
274 } // namespace content | 275 } // namespace content |
OLD | NEW |