]> git.pld-linux.org Git - packages/chromium-browser.git/blob - enable-video-decode-accel.patch
- pl
[packages/chromium-browser.git] / enable-video-decode-accel.patch
1 t a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
2 index 025d971..cdadc1d 100644
3 --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
4 +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
5 @@ -31,7 +31,7 @@
6  #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
7  #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
8  #include "content/common/gpu/media/v4l2_video_device.h"
9 -#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
10 +#elif (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
11  #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
12  #include "ui/gl/gl_context_glx.h"
13  #include "ui/gl/gl_implementation.h"
14 @@ -273,7 +273,7 @@ void GpuVideoDecodeAccelerator::Initialize(
15        make_context_current_,
16        device.Pass(),
17        io_message_loop_));
18 -#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
19 +#elif (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
20    if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) {
21      VLOG(1) << "HW video decode acceleration not available without "
22                 "DesktopGL (GLX).";
23 diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
24 index 3fe89d3..9d05701 100644
25 --- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
26 +++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
27 @@ -17,7 +17,7 @@
28  #include "media/base/limits.h"
29  #include "media/base/video_frame.h"
30  
31 -#if defined(OS_CHROMEOS) && defined(USE_X11)
32 +#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_X11)
33  
34  #if defined(ARCH_CPU_ARMEL)
35  #include "content/common/gpu/media/v4l2_video_encode_accelerator.h"
36 @@ -174,7 +174,7 @@ GpuVideoEncodeAccelerator::GetSupportedProfiles() {
37  scoped_ptr<media::VideoEncodeAccelerator>
38  GpuVideoEncodeAccelerator::CreateEncoder() {
39    scoped_ptr<media::VideoEncodeAccelerator> encoder;
40 -#if defined(OS_CHROMEOS) && defined(USE_X11)
41 +#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_X11)
42  #if defined(ARCH_CPU_ARMEL)
43    scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
44    if (device)
45 diff --git a/content/content_common.gypi b/content/content_common.gypi
46 index c902ca7..91e0bc7 100644
47 --- a/content/content_common.gypi
48 +++ b/content/content_common.gypi
49 @@ -763,7 +763,7 @@
50          '<(DEPTH)/third_party/khronos',
51        ],
52      }],
53 -    ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
54 +    ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1) and use_x11 == 1', {
55        'dependencies': [
56          '../media/media.gyp:media',
57          '../third_party/libyuv/libyuv.gyp:libyuv',
58 diff --git a/content/content_gpu.gypi b/content/content_gpu.gypi
59 index 4400ec8..a464fcb 100644
60 --- a/content/content_gpu.gypi
61 +++ b/content/content_gpu.gypi
62 @@ -40,7 +40,7 @@
63          ],
64        },
65      }],
66 -    ['target_arch!="arm" and chromeos == 1', {
67 +    ['target_arch!="arm" and (chromeos == 1 or desktop_linux == 1)', {
68        'include_dirs': [
69          '<(DEPTH)/third_party/libva',
70        ],
71 diff --git a/content/content_tests.gypi b/content/content_tests.gypi
72 index 4f3744d..effd27d 100644
73 --- a/content/content_tests.gypi
74 +++ b/content/content_tests.gypi
75 @@ -1518,7 +1518,7 @@
76            },
77          ]
78      }],
79 -    ['chromeos==1 and use_x11 == 1 and target_arch != "arm"', {
80 +    ['(chromeos==1 or desktop_linux==1) and use_x11 == 1 and target_arch != "arm"', {
81        'targets': [
82            {
83              'target_name': 'vaapi_h264_decoder_unittest',
84 diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
85 index 4d5ce41..21dd525 100644
86 --- a/content/public/common/content_switches.cc
87 +++ b/content/public/common/content_switches.cc
88 @@ -918,7 +918,9 @@ const char kDisableWebAudio[]               = "disable-webaudio";
89  #if defined(OS_CHROMEOS)
90  // Disables panel fitting (used for mirror mode).
91  const char kDisablePanelFitting[]           = "disable-panel-fitting";
92 +#endif
93  
94 +#if defined(OS_CHROMEOS) || defined(OS_LINUX)
95  // Enables VA-API accelerated video encode.
96  const char kDisableVaapiAcceleratedVideoEncode[] =
97      "disable-vaapi-accelerated-video-encode";
98 diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
99 index 463e6ed..78aa026 100644
100 --- a/content/public/common/content_switches.h
101 +++ b/content/public/common/content_switches.h
102 @@ -265,6 +265,9 @@ CONTENT_EXPORT extern const char kDisableWebAudio[];
103  
104  #if defined(OS_CHROMEOS)
105  CONTENT_EXPORT extern const char kDisablePanelFitting[];
106 +#endif
107 +
108 +#if defined(OS_CHROMEOS) || defined(OS_LINUX)
109  CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
110  #endif
111  
112 diff --git a/media/media.gyp b/media/media.gyp
113 index 661d5c7..300480c 100644
114 --- a/media/media.gyp
115 +++ b/media/media.gyp
116 @@ -663,7 +663,7 @@
117            ],
118          }],
119          # For VaapiVideoEncodeAccelerator.
120 -        ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
121 +        ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1) and use_x11 == 1', {
122            'sources': [
123              'filters/h264_bitstream_buffer.cc',
124              'filters/h264_bitstream_buffer.h',
125 @@ -1367,7 +1367,7 @@
126              }],
127            ],
128          }],
129 -        ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
130 +        ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1) and use_x11 == 1', {
131            'sources': [
132              'filters/h264_bitstream_buffer_unittest.cc',
133            ],
This page took 0.081126 seconds and 3 git commands to generate.