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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 gles2->WaitSyncPointCHROMIUM(sync_point); | 202 gles2->WaitSyncPointCHROMIUM(sync_point); |
203 | 203 |
204 // Callers expect the WaitSyncPoint to affect the next IPCs. Make sure to | 204 // Callers expect the WaitSyncPoint to affect the next IPCs. Make sure to |
205 // flush the command buffers to ensure that. | 205 // flush the command buffers to ensure that. |
206 gles2->ShallowFlushCHROMIUM(); | 206 gles2->ShallowFlushCHROMIUM(); |
207 } | 207 } |
208 | 208 |
209 scoped_ptr<gfx::GpuMemoryBuffer> | 209 scoped_ptr<gfx::GpuMemoryBuffer> |
210 RendererGpuVideoAcceleratorFactories::AllocateGpuMemoryBuffer( | 210 RendererGpuVideoAcceleratorFactories::AllocateGpuMemoryBuffer( |
211 const gfx::Size& size, | 211 const gfx::Size& size, |
212 gfx::GpuMemoryBuffer::Format format, | 212 gfx::BufferFormat format, |
213 gfx::GpuMemoryBuffer::Usage usage) { | 213 gfx::BufferUsage usage) { |
214 DCHECK(task_runner_->BelongsToCurrentThread()); | 214 DCHECK(task_runner_->BelongsToCurrentThread()); |
215 scoped_ptr<gfx::GpuMemoryBuffer> buffer = | 215 scoped_ptr<gfx::GpuMemoryBuffer> buffer = |
216 gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer(size, format, usage); | 216 gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer(size, format, usage); |
217 return buffer.Pass(); | 217 return buffer.Pass(); |
218 } | 218 } |
219 | 219 |
220 bool RendererGpuVideoAcceleratorFactories::IsTextureRGSupported() { | 220 bool RendererGpuVideoAcceleratorFactories::IsTextureRGSupported() { |
221 DCHECK(task_runner_->BelongsToCurrentThread()); | 221 DCHECK(task_runner_->BelongsToCurrentThread()); |
222 | 222 |
223 WebGraphicsContext3DCommandBufferImpl* context = GetContext3d(); | 223 WebGraphicsContext3DCommandBufferImpl* context = GetContext3d(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 media::VideoEncodeAccelerator::SupportedProfiles | 267 media::VideoEncodeAccelerator::SupportedProfiles |
268 RendererGpuVideoAcceleratorFactories:: | 268 RendererGpuVideoAcceleratorFactories:: |
269 GetVideoEncodeAcceleratorSupportedProfiles() { | 269 GetVideoEncodeAcceleratorSupportedProfiles() { |
270 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( | 270 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( |
271 gpu_channel_host_->gpu_info() | 271 gpu_channel_host_->gpu_info() |
272 .video_encode_accelerator_supported_profiles); | 272 .video_encode_accelerator_supported_profiles); |
273 } | 273 } |
274 | 274 |
275 } // namespace content | 275 } // namespace content |
OLD | NEW |