OLD | NEW |
---|---|
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 "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h" | 5 #include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h" |
6 #include "content/gpu/gpu_child_thread.h" | |
jam
2016/04/08 16:16:25
nit: add blank line before
kcwu
2016/04/08 16:39:44
Done.
Move the corresponding header of this file t
| |
6 #include "content/public/gpu/gpu_video_decode_accelerator_factory.h" | 7 #include "content/public/gpu/gpu_video_decode_accelerator_factory.h" |
7 | 8 |
8 namespace content { | 9 namespace content { |
9 | 10 |
10 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} | 11 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} |
11 | 12 |
12 // static | 13 // static |
13 scoped_ptr<GpuVideoDecodeAcceleratorFactory> | 14 scoped_ptr<GpuVideoDecodeAcceleratorFactory> |
14 GpuVideoDecodeAcceleratorFactory::Create( | 15 GpuVideoDecodeAcceleratorFactory::Create( |
15 const GetGLContextCallback& get_gl_context_cb, | 16 const GetGLContextCallback& get_gl_context_cb, |
(...skipping 21 matching lines...) Expand all Loading... | |
37 get_gles2_decoder_cb); | 38 get_gles2_decoder_cb); |
38 if (!gvdafactory_impl) | 39 if (!gvdafactory_impl) |
39 return nullptr; | 40 return nullptr; |
40 | 41 |
41 return make_scoped_ptr( | 42 return make_scoped_ptr( |
42 new GpuVideoDecodeAcceleratorFactory(std::move(gvdafactory_impl))); | 43 new GpuVideoDecodeAcceleratorFactory(std::move(gvdafactory_impl))); |
43 } | 44 } |
44 | 45 |
45 // static | 46 // static |
46 gpu::VideoDecodeAcceleratorCapabilities | 47 gpu::VideoDecodeAcceleratorCapabilities |
47 GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities( | 48 GpuVideoDecodeAcceleratorFactory::GetDecoderCapabilities() { |
48 const gpu::GpuPreferences& gpu_preferences) { | 49 const gpu::GpuPreferences gpu_preferences = |
50 GpuChildThread::current()->gpu_preferences(); | |
49 return GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities( | 51 return GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities( |
50 gpu_preferences); | 52 gpu_preferences); |
51 } | 53 } |
52 | 54 |
53 scoped_ptr<media::VideoDecodeAccelerator> | 55 scoped_ptr<media::VideoDecodeAccelerator> |
54 GpuVideoDecodeAcceleratorFactory::CreateVDA( | 56 GpuVideoDecodeAcceleratorFactory::CreateVDA( |
55 media::VideoDecodeAccelerator::Client* client, | 57 media::VideoDecodeAccelerator::Client* client, |
56 const media::VideoDecodeAccelerator::Config& config, | 58 const media::VideoDecodeAccelerator::Config& config) { |
57 const gpu::GpuPreferences& gpu_preferences) { | |
58 if (!gvdafactory_impl_) | 59 if (!gvdafactory_impl_) |
59 return nullptr; | 60 return nullptr; |
60 | 61 |
62 const gpu::GpuPreferences gpu_preferences = | |
63 GpuChildThread::current()->gpu_preferences(); | |
61 return gvdafactory_impl_->CreateVDA(client, config, gpu_preferences); | 64 return gvdafactory_impl_->CreateVDA(client, config, gpu_preferences); |
62 } | 65 } |
63 | 66 |
64 GpuVideoDecodeAcceleratorFactory::GpuVideoDecodeAcceleratorFactory( | 67 GpuVideoDecodeAcceleratorFactory::GpuVideoDecodeAcceleratorFactory( |
65 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl) | 68 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl) |
66 : gvdafactory_impl_(std::move(gvdafactory_impl)) {} | 69 : gvdafactory_impl_(std::move(gvdafactory_impl)) {} |
67 | 70 |
68 } // namespace content | 71 } // namespace content |
OLD | NEW |