update VA-API patch from saiarcot895's repo

2f24a35a0f
This commit is contained in:
Mikhail Novosyolov 2021-05-27 21:00:23 +03:00
parent 53d82337e9
commit a33bb95ff0

View file

@ -36,84 +36,6 @@ Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
---
Index: dev/chrome/browser/about_flags.cc
===================================================================
--- dev.orig/chrome/browser/about_flags.cc
+++ dev/chrome/browser/about_flags.cc
@@ -3014,7 +3014,7 @@ const FeatureEntry kFeatureEntries[] = {
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
flag_descriptions::kAcceleratedVideoDecodeDescription,
- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
+ kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
#endif // (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) &&
@@ -3510,10 +3510,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop,
MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)},
#endif // ENABLE_VR
-#if BUILDFLAG(IS_CHROMEOS_ASH)
+#if (BUILDFLAG(IS_CHROMEOS_ASH)) || (defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS))
{"disable-accelerated-mjpeg-decode",
flag_descriptions::kAcceleratedMjpegDecodeName,
- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
Index: dev/chrome/browser/flag_descriptions.cc
===================================================================
--- dev.orig/chrome/browser/flag_descriptions.cc
+++ dev/chrome/browser/flag_descriptions.cc
@@ -3656,7 +3656,7 @@ const char kVideoToolboxVp9DecodingDescr
// Chrome OS -------------------------------------------------------------------
-#if BUILDFLAG(IS_CHROMEOS_ASH)
+#if (BUILDFLAG(IS_CHROMEOS_ASH)) || (defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS))
const char kAccountManagementFlowsV2Name[] =
"Enable redesign of account management flows";
@@ -3671,6 +3671,12 @@ const char kAcceleratedMjpegDecodeDescri
"Enable hardware-accelerated mjpeg decode for captured frame where "
"available.";
+#endif
+
+// Chrome OS -------------------------------------------------------------------
+
+#if defined(OS_CHROMEOS)
+
const char kAllowDisableMouseAccelerationName[] =
"Allow disabling mouse acceleration";
const char kAllowDisableMouseAccelerationDescription[] =
Index: dev/chrome/browser/flag_descriptions.h
===================================================================
--- dev.orig/chrome/browser/flag_descriptions.h
+++ dev/chrome/browser/flag_descriptions.h
@@ -2114,7 +2114,7 @@ extern const char kVideoToolboxVp9Decodi
// Chrome OS ------------------------------------------------------------------
-#if BUILDFLAG(IS_CHROMEOS_ASH)
+#if (BUILDFLAG(IS_CHROMEOS_ASH)) || (defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS))
extern const char kAccountManagementFlowsV2Name[];
extern const char kAccountManagementFlowsV2Description[];
@@ -2122,6 +2122,12 @@ extern const char kAccountManagementFlow
extern const char kAcceleratedMjpegDecodeName[];
extern const char kAcceleratedMjpegDecodeDescription[];
+#endif
+
+// Chrome OS ------------------------------------------------------------------
+
+#if defined(OS_CHROMEOS)
+
extern const char kAllowDisableMouseAccelerationName[];
extern const char kAllowDisableMouseAccelerationDescription[];
Index: dev/content/gpu/BUILD.gn
===================================================================
--- dev.orig/content/gpu/BUILD.gn
@ -139,7 +61,7 @@ Index: dev/media/gpu/gpu_video_decode_accelerator_factory.cc
===================================================================
--- dev.orig/media/gpu/gpu_video_decode_accelerator_factory.cc
+++ dev/media/gpu/gpu_video_decode_accelerator_factory.cc
@@ -160,6 +160,8 @@ GpuVideoDecodeAcceleratorFactory::Create
@@ -164,6 +164,8 @@ GpuVideoDecodeAcceleratorFactory::Create
vda = (this->*create_vda_function)(workarounds, gpu_preferences, media_log);
if (vda && vda->Initialize(config, client))
return vda;
@ -148,7 +70,7 @@ Index: dev/media/gpu/gpu_video_decode_accelerator_factory.cc
}
return nullptr;
@@ -218,6 +220,7 @@ GpuVideoDecodeAcceleratorFactory::Create
@@ -222,6 +224,7 @@ GpuVideoDecodeAcceleratorFactory::Create
const gpu::GpuDriverBugWorkarounds& workarounds,
const gpu::GpuPreferences& gpu_preferences,
MediaLog* media_log) const {
@ -180,7 +102,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
===================================================================
--- dev.orig/media/gpu/vaapi/vaapi_wrapper.cc
+++ dev/media/gpu/vaapi/vaapi_wrapper.cc
@@ -520,6 +520,11 @@ void VADisplayState::PreSandboxInitializ
@@ -526,6 +526,11 @@ void VADisplayState::PreSandboxInitializ
base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE);
if (drm_file.IsValid())
VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile());
@ -192,7 +114,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
}
VADisplayState::VADisplayState()
@@ -626,10 +631,6 @@ bool VADisplayState::InitializeVaDriver_
@@ -632,10 +637,6 @@ bool VADisplayState::InitializeVaDriver_
}
bool VADisplayState::InitializeOnce() {
@ -203,7 +125,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
// Set VA logging level, unless already set.
constexpr char libva_log_level_env[] = "LIBVA_MESSAGING_LEVEL";
std::unique_ptr<base::Environment> env(base::Environment::Create());
@@ -650,7 +651,6 @@ bool VADisplayState::InitializeOnce() {
@@ -656,7 +657,6 @@ bool VADisplayState::InitializeOnce() {
// https://github.com/intel/media-driver/issues/818
if (!env->HasVar(libva_driver_impl_env))
env->SetVar(libva_driver_impl_env, "i965");
@ -211,7 +133,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
// Re-initialize with the new driver.
va_display_ = nullptr;
va_initialized_ = false;
@@ -856,7 +856,7 @@ bool AreAttribsSupported(const base::Loc
@@ -864,7 +864,7 @@ bool AreAttribsSupported(const base::Loc
if (attribs[i].type != required_attribs[i].type ||
(attribs[i].value & required_attribs[i].value) !=
required_attribs[i].value) {