Chromium Code Reviews| Index: content/common/gpu/media/gpu_jpeg_decode_accelerator.cc |
| diff --git a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc |
| index 741870f83d11488a290946d68bbd2272f6439d2a..eaafd7ae14caca1ce078d3fcd594173a3d58c5be 100644 |
| --- a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc |
| +++ b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc |
| @@ -21,9 +21,15 @@ |
| #include "media/filters/jpeg_parser.h" |
| #include "ui/gfx/geometry/size.h" |
| -#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| +#if defined(OS_CHROMEOS) |
| +#if defined(ARCH_CPU_X86_FAMILY) |
| #include "content/common/gpu/media/vaapi_jpeg_decode_accelerator.h" |
| #endif |
| +#if defined(USE_V4L2_CODEC) |
| +#include "content/common/gpu/media/v4l2_device.h" |
| +#include "content/common/gpu/media/v4l2_jpeg_decode_accelerator.h" |
| +#endif |
| +#endif |
| namespace { |
| @@ -290,6 +296,13 @@ void GpuJpegDecodeAccelerator::AddClient(int32 route_id, |
| // update as well. |
| #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| accelerator.reset(new VaapiJpegDecodeAccelerator(io_task_runner_)); |
| +#elif defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
| + scoped_refptr<V4L2Device> device = V4L2Device::Create( |
| + V4L2Device::kJpegDecoder); |
| + if (device.get()) { |
|
Pawel Osciak
2015/06/16 07:13:21
Nit: I think just if (device) should work.
henryhsu
2015/06/16 09:37:21
Done.
|
| + accelerator.reset(new V4L2JpegDecodeAccelerator( |
| + device, io_task_runner_)); |
| + } |
| #else |
| DVLOG(1) << "HW JPEG decode acceleration not available."; |
| #endif |