A new user interface for you! Read more...

File chromium-vaapi.patch of Package chromium

From abc7295ca1653c85472916909f0eb76e28e79a58 Mon Sep 17 00:00:00 2001
From: Akarshan Biswas <akarshan.biswas@gmail.com>
Date: Thu, 24 Jan 2019 12:45:29 +0530
Subject: [PATCH] Enable mojo with VDA2 on Linux

---
 chrome/browser/about_flags.cc                |  8 ++++----
 chrome/browser/flag_descriptions.cc          |  9 +++++++--
 chrome/browser/flag_descriptions.h           | 10 ++++++++--
 gpu/config/software_rendering_list.json      |  3 ++-
 media/media_options.gni                      |  9 ++++++---
 media/mojo/services/gpu_mojo_media_client.cc |  4 ++--
 6 files changed, 29 insertions(+), 14 deletions(-)

Index: chromium-73.0.3683.75/chrome/browser/about_flags.cc
===================================================================
--- chromium-73.0.3683.75.orig/chrome/browser/about_flags.cc
+++ chromium-73.0.3683.75/chrome/browser/about_flags.cc
@@ -1606,7 +1606,7 @@ const FeatureEntry kFeatureEntries[] = {
         "disable-accelerated-video-decode",
         flag_descriptions::kAcceleratedVideoDecodeName,
         flag_descriptions::kAcceleratedVideoDecodeDescription,
-        kOsMac | kOsWin | kOsCrOS | kOsAndroid,
+        kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
         SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
     },
 #if defined(OS_WIN)
@@ -2216,12 +2216,12 @@ const FeatureEntry kFeatureEntries[] = {
      FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
 #endif  // ENABLE_ISOLATED_XR_SERVICE
 #endif  // ENABLE_VR
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
     {"disable-accelerated-mjpeg-decode",
      flag_descriptions::kAcceleratedMjpegDecodeName,
-     flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
+     flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
      SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
-#endif  // OS_CHROMEOS
+#endif  // OS_CHROMEOS // OS_LINUX
     {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
      flag_descriptions::kV8CacheOptionsDescription, kOsAll,
      MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
Index: chromium-73.0.3683.75/chrome/browser/flag_descriptions.cc
===================================================================
--- chromium-73.0.3683.75.orig/chrome/browser/flag_descriptions.cc
+++ chromium-73.0.3683.75/chrome/browser/flag_descriptions.cc
@@ -3096,15 +3096,20 @@ const char kTextSuggestionsTouchBarDescr
 
 #endif
 
-// Chrome OS -------------------------------------------------------------------
+// Chrome OS Linux-------------------------------------------------------------------
 
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
 
 const char kAcceleratedMjpegDecodeName[] =
     "Hardware-accelerated mjpeg decode for captured frame";
 const char kAcceleratedMjpegDecodeDescription[] =
     "Enable hardware-accelerated mjpeg decode for captured frame where "
     "available.";
+#endif
+
+// Chrome OS --------------------------------------------------
+
+#if defined(OS_CHROMEOS)
 
 const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click";
 const char kAllowTouchpadThreeFingerClickDescription[] =
Index: chromium-73.0.3683.75/chrome/browser/flag_descriptions.h
===================================================================
--- chromium-73.0.3683.75.orig/chrome/browser/flag_descriptions.h
+++ chromium-73.0.3683.75/chrome/browser/flag_descriptions.h
@@ -1842,13 +1842,19 @@ extern const char kPermissionPromptPersi
 
 #endif  // defined(OS_MACOSX)
 
-// Chrome OS ------------------------------------------------------------------
+// Chrome OS and Linux ------------------------------------------------------------------
 
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
 
 extern const char kAcceleratedMjpegDecodeName[];
 extern const char kAcceleratedMjpegDecodeDescription[];
 
+#endif // defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+// Chrome OS ------------------------------------------------------------------------
+
+#if defined(OS_CHROMEOS)
+
 extern const char kAllowTouchpadThreeFingerClickName[];
 extern const char kAllowTouchpadThreeFingerClickDescription[];
 
Index: chromium-73.0.3683.75/gpu/config/software_rendering_list.json
===================================================================
--- chromium-73.0.3683.75.orig/gpu/config/software_rendering_list.json
+++ chromium-73.0.3683.75/gpu/config/software_rendering_list.json
@@ -371,11 +371,12 @@
     },
     {
       "id": 48,
-      "description": "Accelerated video decode is unavailable on Linux",
+      "description": "Accelerated VA-API video decode is not supported on NVIDIA platforms",
       "cr_bugs": [137247],
       "os": {
         "type": "linux"
       },
+      "vendor_id": "0x10de",
       "features": [
         "accelerated_video_decode"
       ]