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

Side by Side Diff: media/gpu/gpu_video_decode_accelerator_factory_impl.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "media/gpu/gpu_video_decode_accelerator_factory_impl.h" 5 #include "media/gpu/gpu_video_decode_accelerator_factory_impl.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "gpu/command_buffer/service/gpu_preferences.h" 8 #include "gpu/command_buffer/service/gpu_preferences.h"
9 #include "media/gpu/gpu_video_accelerator_util.h" 9 #include "media/gpu/gpu_video_accelerator_util.h"
10 #include "media/gpu/media_gpu_export.h" 10 #include "media/gpu/media_gpu_export.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 #endif 167 #endif
168 168
169 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) 169 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
170 std::unique_ptr<media::VideoDecodeAccelerator> 170 std::unique_ptr<media::VideoDecodeAccelerator>
171 GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA( 171 GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA(
172 const gpu::GpuPreferences& gpu_preferences) const { 172 const gpu::GpuPreferences& gpu_preferences) const {
173 std::unique_ptr<media::VideoDecodeAccelerator> decoder; 173 std::unique_ptr<media::VideoDecodeAccelerator> decoder;
174 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 174 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
175 if (device.get()) { 175 if (device.get()) {
176 decoder.reset(new V4L2VideoDecodeAccelerator( 176 decoder.reset(new V4L2VideoDecodeAccelerator(
177 gfx::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_, 177 gl::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_,
178 make_context_current_cb_, device)); 178 make_context_current_cb_, device));
179 } 179 }
180 return decoder; 180 return decoder;
181 } 181 }
182 182
183 std::unique_ptr<media::VideoDecodeAccelerator> 183 std::unique_ptr<media::VideoDecodeAccelerator>
184 GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2SVDA( 184 GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2SVDA(
185 const gpu::GpuPreferences& gpu_preferences) const { 185 const gpu::GpuPreferences& gpu_preferences) const {
186 std::unique_ptr<media::VideoDecodeAccelerator> decoder; 186 std::unique_ptr<media::VideoDecodeAccelerator> decoder;
187 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 187 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
188 if (device.get()) { 188 if (device.get()) {
189 decoder.reset(new V4L2SliceVideoDecodeAccelerator( 189 decoder.reset(new V4L2SliceVideoDecodeAccelerator(
190 device, gfx::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_, 190 device, gl::GLSurfaceEGL::GetHardwareDisplay(), get_gl_context_cb_,
191 make_context_current_cb_)); 191 make_context_current_cb_));
192 } 192 }
193 return decoder; 193 return decoder;
194 } 194 }
195 #endif 195 #endif
196 196
197 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 197 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
198 std::unique_ptr<media::VideoDecodeAccelerator> 198 std::unique_ptr<media::VideoDecodeAccelerator>
199 GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA( 199 GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA(
200 const gpu::GpuPreferences& gpu_preferences) const { 200 const gpu::GpuPreferences& gpu_preferences) const {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 const BindGLImageCallback& bind_image_cb, 233 const BindGLImageCallback& bind_image_cb,
234 const GetGLES2DecoderCallback& get_gles2_decoder_cb) 234 const GetGLES2DecoderCallback& get_gles2_decoder_cb)
235 : get_gl_context_cb_(get_gl_context_cb), 235 : get_gl_context_cb_(get_gl_context_cb),
236 make_context_current_cb_(make_context_current_cb), 236 make_context_current_cb_(make_context_current_cb),
237 bind_image_cb_(bind_image_cb), 237 bind_image_cb_(bind_image_cb),
238 get_gles2_decoder_cb_(get_gles2_decoder_cb) {} 238 get_gles2_decoder_cb_(get_gles2_decoder_cb) {}
239 239
240 GpuVideoDecodeAcceleratorFactoryImpl::~GpuVideoDecodeAcceleratorFactoryImpl() {} 240 GpuVideoDecodeAcceleratorFactoryImpl::~GpuVideoDecodeAcceleratorFactoryImpl() {}
241 241
242 } // namespace media 242 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/gpu_video_decode_accelerator_factory_impl.h ('k') | media/gpu/gpu_video_decode_accelerator_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698