]> git.pld-linux.org Git - packages/chromium-browser.git/commitdiff
- reenabled vaapi decode
authorLukasz Glebicki <blekot@pld-linux.org>
Thu, 12 Feb 2015 19:45:50 +0000 (20:45 +0100)
committerLukasz Glebicki <blekot@pld-linux.org>
Thu, 12 Feb 2015 19:45:50 +0000 (20:45 +0100)
chromium-browser.spec
enable-video-decode-accel.patch

index 1506daae8ecee071b95eee8d3b32de72756eb389..905485b5740400aebb18286a1a8cb81d19e1daf5 100644 (file)
@@ -84,7 +84,7 @@ Version:      %{branch}.%{patchver}
 %else
 Version:       %{branch}.%{basever}
 %endif
-Release:       1
+Release:       2
 License:       BSD%{!?with_system_ffmpeg:, LGPL v2+ (ffmpeg)}
 Group:         X11/Applications/Networking
 Source0:       http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{branch}.%{basever}.tar.xz
@@ -102,6 +102,7 @@ Source7:    clean-source.sh
 Source8:       get-source.sh
 Source9:       master_preferences.json
 Patch2:                enable-video-decode-accel.patch
+# https://github.com/Kelvin-Ng/Kelvin-Gentoo-Overlay/tree/master/www-client/chromium/files
 Patch4:                path-libpdf.patch
 Patch7:                dlopen_sonamed_gl.patch
 Patch8:                chromium_useragent.patch.in
@@ -120,6 +121,7 @@ Patch32:    remove_bundled_libraries-stale.patch
 Patch35:       etc-dir.patch
 Patch36:       angle.patch
 Patch37:       %{name}-build.patch
+Patch38:       vaapi_include.patch
 URL:           http://www.chromium.org/Home
 %{?with_gconf:BuildRequires:   GConf2-devel}
 %{?with_system_mesa:BuildRequires:     Mesa-libGL-devel >= 9.1}
@@ -310,7 +312,8 @@ sed -e 's/@BUILD_DIST@/PLD %{pld_version}/g' \
 %{__sed} -e 's,@localedir@,%{_datadir}/%{name},' %{SOURCE5} > find-lang.sh
 ln -s %{SOURCE7} .
 
-#%patch2 -p1 NOT COMPILING
+%patch2 -p1 
+#NOT COMPILING
 %patch4 -p3
 %patch7 -p1
 %patch15 -p2
@@ -326,6 +329,7 @@ ln -s %{SOURCE7} .
 %patch35 -p1
 %patch36 -p1
 %patch37 -p1
+%patch38 -p1
 
 %{?with_dev:exit 0}
 
index 46b1522336e379e28792e95c6694f71e0c7916c8..858ddd820f5be8ce1ef2b20aec32b5de3efefde1 100644 (file)
---- chromium-browser-33.0.1750.146/content/common/gpu/media/gpu_video_decode_accelerator.cc~   2014-02-20 21:28:24.000000000 +0100
-+++ chromium-browser-33.0.1750.146/content/common/gpu/media/gpu_video_decode_accelerator.cc    2014-03-12 16:52:52.265999592 +0100
-@@ -278,7 +278,7 @@
-       weak_factory_for_io_.GetWeakPtr(),
+t a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
+index 025d971..cdadc1d 100644
+--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
++++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
+@@ -31,7 +31,7 @@
+ #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
+ #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
+ #include "content/common/gpu/media/v4l2_video_device.h"
+-#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
++#elif (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
+ #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
+ #include "ui/gl/gl_context_glx.h"
+ #include "ui/gl/gl_implementation.h"
+@@ -273,7 +273,7 @@ void GpuVideoDecodeAccelerator::Initialize(
        make_context_current_,
+       device.Pass(),
        io_message_loop_));
 -#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
-+#elif defined(OS_LINUX) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
-   gfx::GLContextGLX* glx_context =
-       static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext());
-   GLXContext glx_context_handle =
++#elif (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
+   if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) {
+     VLOG(1) << "HW video decode acceleration not available without "
+                "DesktopGL (GLX).";
+diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
+index 3fe89d3..9d05701 100644
+--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
++++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
+@@ -17,7 +17,7 @@
+ #include "media/base/limits.h"
+ #include "media/base/video_frame.h"
+-#if defined(OS_CHROMEOS) && defined(USE_X11)
++#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_X11)
+ #if defined(ARCH_CPU_ARMEL)
+ #include "content/common/gpu/media/v4l2_video_encode_accelerator.h"
+@@ -174,7 +174,7 @@ GpuVideoEncodeAccelerator::GetSupportedProfiles() {
+ scoped_ptr<media::VideoEncodeAccelerator>
+ GpuVideoEncodeAccelerator::CreateEncoder() {
+   scoped_ptr<media::VideoEncodeAccelerator> encoder;
+-#if defined(OS_CHROMEOS) && defined(USE_X11)
++#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_X11)
+ #if defined(ARCH_CPU_ARMEL)
+   scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
+   if (device)
+diff --git a/content/content_common.gypi b/content/content_common.gypi
+index c902ca7..91e0bc7 100644
+--- a/content/content_common.gypi
++++ b/content/content_common.gypi
+@@ -763,7 +763,7 @@
+         '<(DEPTH)/third_party/khronos',
+       ],
+     }],
+-    ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
++    ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1) and use_x11 == 1', {
+       'dependencies': [
+         '../media/media.gyp:media',
+         '../third_party/libyuv/libyuv.gyp:libyuv',
+diff --git a/content/content_gpu.gypi b/content/content_gpu.gypi
+index 4400ec8..a464fcb 100644
+--- a/content/content_gpu.gypi
++++ b/content/content_gpu.gypi
+@@ -40,7 +40,7 @@
+         ],
+       },
+     }],
+-    ['target_arch!="arm" and chromeos == 1', {
++    ['target_arch!="arm" and (chromeos == 1 or desktop_linux == 1)', {
+       'include_dirs': [
+         '<(DEPTH)/third_party/libva',
+       ],
+diff --git a/content/content_tests.gypi b/content/content_tests.gypi
+index 4f3744d..effd27d 100644
+--- a/content/content_tests.gypi
++++ b/content/content_tests.gypi
+@@ -1518,7 +1518,7 @@
+           },
+         ]
+     }],
+-    ['chromeos==1 and use_x11 == 1 and target_arch != "arm"', {
++    ['(chromeos==1 or desktop_linux==1) and use_x11 == 1 and target_arch != "arm"', {
+       'targets': [
+           {
+             'target_name': 'vaapi_h264_decoder_unittest',
+diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
+index 4d5ce41..21dd525 100644
+--- a/content/public/common/content_switches.cc
++++ b/content/public/common/content_switches.cc
+@@ -918,7 +918,9 @@ const char kDisableWebAudio[]               = "disable-webaudio";
+ #if defined(OS_CHROMEOS)
+ // Disables panel fitting (used for mirror mode).
+ const char kDisablePanelFitting[]           = "disable-panel-fitting";
++#endif
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ // Enables VA-API accelerated video encode.
+ const char kDisableVaapiAcceleratedVideoEncode[] =
+     "disable-vaapi-accelerated-video-encode";
+diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
+index 463e6ed..78aa026 100644
+--- a/content/public/common/content_switches.h
++++ b/content/public/common/content_switches.h
+@@ -265,6 +265,9 @@ CONTENT_EXPORT extern const char kDisableWebAudio[];
+ #if defined(OS_CHROMEOS)
+ CONTENT_EXPORT extern const char kDisablePanelFitting[];
++#endif
++
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
+ #endif
+diff --git a/media/media.gyp b/media/media.gyp
+index 661d5c7..300480c 100644
+--- a/media/media.gyp
++++ b/media/media.gyp
+@@ -663,7 +663,7 @@
+           ],
+         }],
+         # For VaapiVideoEncodeAccelerator.
+-        ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
++        ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1) and use_x11 == 1', {
+           'sources': [
+             'filters/h264_bitstream_buffer.cc',
+             'filters/h264_bitstream_buffer.h',
+@@ -1367,7 +1367,7 @@
+             }],
+           ],
+         }],
+-        ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
++        ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1) and use_x11 == 1', {
+           'sources': [
+             'filters/h264_bitstream_buffer_unittest.cc',
+           ],
This page took 0.05593 seconds and 4 git commands to generate.