diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | chromium-libva-r2.patch | 35 | ||||
-rw-r--r-- | chromium-vaapi-init.patch | 223 | ||||
-rw-r--r-- | chromium-vaapi-move.patch.gz | bin | 0 -> 121449 bytes | |||
-rw-r--r-- | chromium-vaapi-r16.patch (renamed from chromium-vaapi-r15.patch) | 236 | ||||
-rw-r--r-- | chromium-vaapi-rgbx.patch | 35 |
7 files changed, 344 insertions, 215 deletions
@@ -59,8 +59,10 @@ pkgbase = chromium-vaapi source = chromium-clang-r2.patch source = chromium-exclude_unwind_tables.patch source = chromium-widevine.patch - source = chromium-vaapi-r15.patch - source = chromium-libva-r2.patch + source = chromium-vaapi-move.patch.gz + source = chromium-vaapi-init.patch + source = chromium-vaapi-rgbx.patch + source = chromium-vaapi-r16.patch sha256sums = 342ea80a925d85f5155b2b423a0d3cbcf2ee5729bf107c601d7d902315d03127 sha256sums = 4dc3428f2c927955d9ae117f2fb24d098cc6dd67adb760ac9c82b522ec8b0587 sha256sums = a86a8ec67aed5a94557257b9826c5b8fe37005e8376e75986fee77acd066539a @@ -71,8 +73,10 @@ pkgbase = chromium-vaapi sha256sums = 4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3 sha256sums = 9478f1ec1a3c53425306cf41c2d0555c215a4f106955d9d6adfff38044530ce8 sha256sums = d6fdcb922e5a7fbe15759d39ccc8ea4225821c44d98054ce0f23f9d1f00c9808 - sha256sums = a15b2ca40b5ca17d4763e41e226fb5faca22277027e8321675c87038dd9879d5 - sha256sums = fe45088f04d6f5bb8b2aaad2ef2d4b495ee3a3a91b89fa342e54ac00fe99a97b + sha256sums = 12d6663bc61845414b284bb9e2d455e0f4e40f5ae69d035f00505ce9c9403169 + sha256sums = 8a81a14af625c8b79006d1b9b4321d5487bc2e56a3fb3a677f9a8dab369be7af + sha256sums = 0a9186ab591773f8fb6cbc908f9bbf4bc1508f1095b6c1cd7479aac945045373 + sha256sums = b82047df666e6bbf66e0c0911d20c5001bd1100fd08adafa92cac5f02a887a01 pkgname = chromium-vaapi @@ -39,8 +39,10 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom chromium-clang-r2.patch chromium-exclude_unwind_tables.patch chromium-widevine.patch - chromium-vaapi-r15.patch - chromium-libva-r2.patch) + chromium-vaapi-move.patch.gz + chromium-vaapi-init.patch + chromium-vaapi-rgbx.patch + chromium-vaapi-r16.patch) sha256sums=('342ea80a925d85f5155b2b423a0d3cbcf2ee5729bf107c601d7d902315d03127' '4dc3428f2c927955d9ae117f2fb24d098cc6dd67adb760ac9c82b522ec8b0587' @@ -52,8 +54,10 @@ sha256sums=('342ea80a925d85f5155b2b423a0d3cbcf2ee5729bf107c601d7d902315d03127' '4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3' '9478f1ec1a3c53425306cf41c2d0555c215a4f106955d9d6adfff38044530ce8' 'd6fdcb922e5a7fbe15759d39ccc8ea4225821c44d98054ce0f23f9d1f00c9808' - 'a15b2ca40b5ca17d4763e41e226fb5faca22277027e8321675c87038dd9879d5' - 'fe45088f04d6f5bb8b2aaad2ef2d4b495ee3a3a91b89fa342e54ac00fe99a97b') + '12d6663bc61845414b284bb9e2d455e0f4e40f5ae69d035f00505ce9c9403169' + '8a81a14af625c8b79006d1b9b4321d5487bc2e56a3fb3a677f9a8dab369be7af' + '0a9186ab591773f8fb6cbc908f9bbf4bc1508f1095b6c1cd7479aac945045373' + 'b82047df666e6bbf66e0c0911d20c5001bd1100fd08adafa92cac5f02a887a01') # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py # Keys are the names in the above script; values are the dependencies in Arch @@ -145,8 +149,10 @@ prepare() { ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ # VA-API patch - patch -p1 -i "${srcdir}/chromium-vaapi-r15.patch" - patch -p1 -i "${srcdir}/chromium-libva-r2.patch" + patch -Np1 -i "${srcdir}/chromium-vaapi-move.patch" + patch -Np1 -i "${srcdir}/chromium-vaapi-init.patch" + patch -Np1 -i "${srcdir}/chromium-vaapi-rgbx.patch" + patch -Np1 -i "${srcdir}/chromium-vaapi-r16.patch" # Remove bundled libraries for which we will use the system copies; this # *should* do what the remove_bundled_libraries.py script does, with the diff --git a/chromium-libva-r2.patch b/chromium-libva-r2.patch deleted file mode 100644 index dd0871b3fe3d..000000000000 --- a/chromium-libva-r2.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc -+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc -@@ -313,11 +313,11 @@ bool GpuProcessPolicy::PreSandboxHook() - dlopen(I965DrvVideoPath, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); - if (I965HybridDrvVideoPath) - dlopen(I965HybridDrvVideoPath, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); -- dlopen("libva.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); -+ dlopen("libva.so.2", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); - #if defined(USE_OZONE) -- dlopen("libva-drm.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); -+ dlopen("libva-drm.so.2", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); - #elif defined(USE_X11) -- dlopen("libva-x11.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); -+ dlopen("libva-x11.so.2", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); - #endif - } - } ---- a/media/gpu/vaapi_wrapper.cc -+++ b/media/gpu/vaapi_wrapper.cc -@@ -1123,12 +1123,12 @@ void VaapiWrapper::PreSandboxInitialization() { - bool VaapiWrapper::PostSandboxInitialization() { - StubPathMap paths; - -- paths[kModuleVa].push_back("libva.so.1"); -+ paths[kModuleVa].push_back("libva.so.2"); - - #if defined(USE_X11) -- paths[kModuleVa_x11].push_back("libva-x11.so.1"); -+ paths[kModuleVa_x11].push_back("libva-x11.so.2"); - #elif defined(USE_OZONE) -- paths[kModuleVa_drm].push_back("libva-drm.so.1"); -+ paths[kModuleVa_drm].push_back("libva-drm.so.2"); - #endif - - return InitializeStubs(paths); diff --git a/chromium-vaapi-init.patch b/chromium-vaapi-init.patch new file mode 100644 index 000000000000..0cd4557b59bd --- /dev/null +++ b/chromium-vaapi-init.patch @@ -0,0 +1,223 @@ +From a57aa298ed3c3b76056d6e24fb09db05dca2f465 Mon Sep 17 00:00:00 2001 +From: Daniel Charles <daniel.charles@intel.com> +Date: Thu, 25 Jan 2018 13:01:37 -0800 +Subject: [PATCH] vaapi initialization: move it to vaapi_wrapper + +vaapi loading of libraries happens on the Pre and Post Sandbox +functions. Moving dynamic loading of libaries, i.e. libva,libva-drm +and i965_drv_video shared libraries to vaapi_wrapper. + +When calling PreSandbox function in vaapi_wrapper libva will open +i965_drv_video shared library and both will be available for use + +BUG=chromium:785117 +TEST="video initialization of h/w dec/enc, VAVDA/VAVEA/VAJDA subjective" +TEST="testing and include unittests and autotests" + +Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel +Change-Id: I862bb49f1167d7437e80387882cb9081ad53f54b +Signed-off-by: Daniel Charles <daniel.charles@intel.com> +--- + +--- a/content/gpu/gpu_sandbox_hook_linux.cc ++++ b/content/gpu/gpu_sandbox_hook_linux.cc +@@ -28,10 +28,6 @@ + #include "services/service_manager/sandbox/linux/bpf_gpu_policy_linux.h" + #include "services/service_manager/sandbox/linux/sandbox_linux.h" + +-#if BUILDFLAG(USE_VAAPI) +-#include <va/va_version.h> +-#endif +- + using sandbox::bpf_dsl::Policy; + using sandbox::syscall_broker::BrokerFilePermission; + using sandbox::syscall_broker::BrokerProcess; +@@ -47,22 +43,6 @@ inline bool IsChromeOS() { + #endif + } + +-inline bool IsArchitectureX86_64() { +-#if defined(__x86_64__) +- return true; +-#else +- return false; +-#endif +-} +- +-inline bool IsArchitectureI386() { +-#if defined(__i386__) +- return true; +-#else +- return false; +-#endif +-} +- + inline bool IsArchitectureArm() { + #if defined(ARCH_CPU_ARM_FAMILY) + return true; +@@ -87,14 +67,6 @@ inline bool UseLibV4L2() { + #endif + } + +-inline bool IsLibVAVersion2() { +-#if BUILDFLAG(USE_VAAPI) && VA_MAJOR_VERSION == 1 +- return true; +-#else +- return false; +-#endif +-} +- + constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; + + void AddV4L2GpuWhitelist( +@@ -259,51 +231,6 @@ void LoadV4L2Libraries() { + } + } + +-void LoadStandardLibraries( +- const service_manager::SandboxSeccompBPF::Options& options) { +- if (IsArchitectureX86_64() || IsArchitectureI386()) { +- // Accelerated video dlopen()'s some shared objects +- // inside the sandbox, so preload them now. +- if (options.vaapi_accelerated_video_encode_enabled || +- options.accelerated_video_decode_enabled) { +- if (IsLibVAVersion2()) { +- if (IsArchitectureX86_64()) { +- dlopen("/usr/lib64/va/drivers/i965_drv_video.so", dlopen_flag); +- dlopen("/usr/lib64/va/drivers/hybrid_drv_video.so", dlopen_flag); +- } else if (IsArchitectureI386()) { +- dlopen("/usr/lib/va/drivers/i965_drv_video.so", dlopen_flag); +- } +- dlopen("libva.so.2", dlopen_flag); +-#if defined(USE_OZONE) +- dlopen("libva-drm.so.2", dlopen_flag); +-#endif +- } else { +- // If we are linked against libva 1, we have two cases to handle: +- // - the sysroot includes both libva 1 and 2, in which case the drivers +- // are in /usr/lib{64}/va1/ +- // - the sysroot only includes libva 1, in which case the drivers are +- // are in /usr/lib{64}/va/ +- // This is ugly, but temporary until all builds have switched to libva 2. +- if (IsArchitectureX86_64()) { +- if (!dlopen("/usr/lib64/va1/drivers/i965_drv_video.so", dlopen_flag)) +- dlopen("/usr/lib64/va/drivers/i965_drv_video.so", dlopen_flag); +- if (!dlopen("/usr/lib64/va1/drivers/hybrid_drv_video.so", dlopen_flag)) +- dlopen("/usr/lib64/va/drivers/hybrid_drv_video.so", dlopen_flag); +- } else if (IsArchitectureI386()) { +- if (!dlopen("/usr/lib/va1/drivers/i965_drv_video.so", dlopen_flag)) +- dlopen("/usr/lib/va/drivers/i965_drv_video.so", dlopen_flag); +- } +- dlopen("libva.so.1", dlopen_flag); +-#if defined(USE_OZONE) +- dlopen("libva-drm.so.1", dlopen_flag); +-#elif defined(USE_X11) +- dlopen("libva-x11.so.1", dlopen_flag); +-#endif +- } +- } +- } +-} +- + bool LoadLibrariesForGpu( + const service_manager::SandboxSeccompBPF::Options& options) { + if (IsChromeOS()) { +@@ -316,7 +243,6 @@ bool LoadLibrariesForGpu( + if (options.use_amd_specific_policies) + return LoadAmdGpuLibraries(); + } +- LoadStandardLibraries(options); + return true; + } + +--- a/media/gpu/vaapi/vaapi_wrapper.cc ++++ b/media/gpu/vaapi/vaapi_wrapper.cc +@@ -163,9 +163,6 @@ class VADisplayState { + void SetDrmFd(base::PlatformFile fd) { drm_fd_.reset(HANDLE_EINTR(dup(fd))); } + + private: +- // Returns false on init failure. +- static bool PostSandboxInitialization(); +- + // Protected by |va_lock_|. + int refcount_; + +@@ -200,43 +197,12 @@ void VADisplayState::PreSandboxInitializ + VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile()); + } + +-// static +-bool VADisplayState::PostSandboxInitialization() { +- const std::string va_suffix(std::to_string(VA_MAJOR_VERSION + 1)); +- StubPathMap paths; +- +- paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix); +- paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix); +-#if defined(USE_X11) +- // libva-x11 does not exist on libva >= 2 +- if (VA_MAJOR_VERSION == 0) +- paths[kModuleVa_x11].push_back("libva-x11.so.1"); +-#endif +- +- const bool success = InitializeStubs(paths); +- if (!success) { +- static const char kErrorMsg[] = "Failed to initialize VAAPI libs"; +-#if defined(OS_CHROMEOS) +- // When Chrome runs on Linux with target_os="chromeos", do not log error +- // message without VAAPI libraries. +- LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS()) << kErrorMsg; +-#else +- DVLOG(1) << kErrorMsg; +-#endif +- } +- return success; +-} +- + VADisplayState::VADisplayState() + : refcount_(0), va_display_(nullptr), va_initialized_(false) {} + + bool VADisplayState::Initialize() { + va_lock_.AssertAcquired(); + +- static bool result = PostSandboxInitialization(); +- if (!result) +- return false; +- + if (refcount_++ > 0) + return true; + +@@ -1367,6 +1333,34 @@ void VaapiWrapper::DeinitializeVpp() { + // static + void VaapiWrapper::PreSandboxInitialization() { + VADisplayState::PreSandboxInitialization(); ++ ++ const std::string va_suffix(std::to_string(VA_MAJOR_VERSION + 1)); ++ StubPathMap paths; ++ ++ paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix); ++ paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix); ++#if defined(USE_X11) ++ paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix); ++#endif ++ ++ static bool result = InitializeStubs(paths); ++ if (!result) { ++ static const char kErrorMsg[] = "Failed to initialize VAAPI libs"; ++#if defined(OS_CHROMEOS) ++ // When Chrome runs on Linux with target_os="chromeos", do not log error ++ // message without VAAPI libraries. ++ LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS()) << kErrorMsg; ++#else ++ DVLOG(1) << kErrorMsg; ++#endif ++ } ++ // next command will dlopen all necessary libraries for ++ // va-api to function properly, to know: ++ // libva.so ++ // i965_drv_video.so ++ // hybrid_drv_video.so (platforms that support it) ++ // libva-x11.so (X11) or libva-drm.so (Ozone). ++ VASupportedProfiles::Get(); + } + + } // namespace media diff --git a/chromium-vaapi-move.patch.gz b/chromium-vaapi-move.patch.gz Binary files differnew file mode 100644 index 000000000000..a46ea2d430ae --- /dev/null +++ b/chromium-vaapi-move.patch.gz diff --git a/chromium-vaapi-r15.patch b/chromium-vaapi-r16.patch index b8dff361a7a5..0020ea744eb1 100644 --- a/chromium-vaapi-r15.patch +++ b/chromium-vaapi-r16.patch @@ -36,13 +36,11 @@ Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171 Signed-off-by: Daniel Charles <daniel.charles@intel.com> --- -diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 3555293..4c3115f 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -1246,12 +1246,14 @@ - flag_descriptions::kUiPartialSwapDescription, kOsAll, - SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)}, +@@ -1249,12 +1249,14 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kEnablePreventLayerSquashingDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kEnablePreventLayerSquashing)}, #if BUILDFLAG(ENABLE_WEBRTC) +#if !defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName, @@ -55,9 +53,9 @@ index 3555293..4c3115f 100644 {"enable-webrtc-hw-h264-encoding", flag_descriptions::kWebrtcHwH264EncodingName, flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS, -@@ -1557,6 +1559,13 @@ - flag_descriptions::kSpuriousPowerButtonLidAngleChangeDescription, kOsCrOS, - MULTI_VALUE_TYPE(kSpuriousPowerButtonLidAngleChangeChoices)}, +@@ -1535,6 +1537,13 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kShowTouchHudDescription, kOsAll, + SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)}, #endif // OS_CHROMEOS +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) + { @@ -69,7 +67,7 @@ index 3555293..4c3115f 100644 { "disable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, -@@ -1564,6 +1573,7 @@ +@@ -1542,6 +1551,7 @@ const FeatureEntry kFeatureEntries[] = { kOsMac | kOsWin | kOsCrOS | kOsAndroid, SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), }, @@ -77,9 +75,9 @@ index 3555293..4c3115f 100644 {"mojo-video-encode-accelerator", flag_descriptions::kMojoVideoEncodeAcceleratorName, flag_descriptions::kMojoVideoEncodeAcceleratorDescription, -@@ -2229,12 +2239,17 @@ - FEATURE_VALUE_TYPE(features::kWebVrVsyncAlign)}, - #endif // OS_ANDROID +@@ -2270,12 +2280,17 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(features::kOpenVR)}, + #endif // ENABLE_OPENVR #endif // ENABLE_VR -#if defined(OS_CHROMEOS) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) @@ -97,8 +95,6 @@ index 3555293..4c3115f 100644 {"v8-cache-options", flag_descriptions::kV8CacheOptionsName, flag_descriptions::kV8CacheOptionsDescription, kOsAll, MULTI_VALUE_TYPE(kV8CacheOptionsChoices)}, -diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc -index 3815e79..d5d3712 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc @@ -19,6 +19,7 @@ @@ -109,7 +105,7 @@ index 3815e79..d5d3712 100644 #include "cc/base/switches.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/boot_times_recorder.h" -@@ -79,8 +80,13 @@ +@@ -84,8 +85,13 @@ void DeriveCommandLine(const GURL& start ::switches::kDisable2dCanvasImageChromium, ::switches::kDisableAccelerated2dCanvas, ::switches::kDisableAcceleratedJpegDecoding, @@ -123,7 +119,7 @@ index 3815e79..d5d3712 100644 ::switches::kDisableBlinkFeatures, ::switches::kDisableCastStreamingHWEncoding, ::switches::kDisableDistanceFieldText, -@@ -166,7 +172,7 @@ +@@ -166,7 +172,7 @@ void DeriveCommandLine(const GURL& start ::switches::kDisableWebGLImageChromium, ::switches::kEnableWebGLImageChromium, ::switches::kEnableWebVR, @@ -132,11 +128,9 @@ index 3815e79..d5d3712 100644 ::switches::kDisableWebRtcHWDecoding, ::switches::kDisableWebRtcHWEncoding, #endif -diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 74e6bc7..ab184a5 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -14,6 +14,13 @@ +@@ -19,6 +19,13 @@ const char kAccelerated2dCanvasDescripti "Enables the use of the GPU to perform 2d canvas rendering instead of " "using software rendering."; @@ -150,7 +144,7 @@ index 74e6bc7..ab184a5 100644 const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode"; const char kAcceleratedVideoDecodeDescription[] = "Hardware-accelerated video decode where available."; -@@ -1478,6 +1485,7 @@ +@@ -1572,6 +1579,7 @@ const char kWebrtcEchoCanceller3Name[] = const char kWebrtcEchoCanceller3Description[] = "Experimental WebRTC echo canceller (AEC3)."; @@ -158,7 +152,7 @@ index 74e6bc7..ab184a5 100644 const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding"; const char kWebrtcHwDecodingDescription[] = "Support in WebRTC for decoding video streams using platform hardware."; -@@ -1485,6 +1493,7 @@ +@@ -1579,6 +1587,7 @@ const char kWebrtcHwDecodingDescription[ const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding"; const char kWebrtcHwEncodingDescription[] = "Support in WebRTC for encoding video streams using platform hardware."; @@ -166,7 +160,7 @@ index 74e6bc7..ab184a5 100644 const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding"; const char kWebrtcHwH264EncodingDescription[] = -@@ -2283,14 +2292,16 @@ +@@ -2390,14 +2399,16 @@ const char kTranslateNewUxDescription[] // Chrome OS ------------------------------------------------------------------- @@ -184,11 +178,9 @@ index 74e6bc7..ab184a5 100644 const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click"; const char kAllowTouchpadThreeFingerClickDescription[] = "Enables touchpad three-finger-click as middle button."; -diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index 54a4950..5ace5e0 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h -@@ -37,6 +37,10 @@ +@@ -37,6 +37,10 @@ namespace flag_descriptions { extern const char kAccelerated2dCanvasName[]; extern const char kAccelerated2dCanvasDescription[]; @@ -199,7 +191,7 @@ index 54a4950..5ace5e0 100644 extern const char kAcceleratedVideoDecodeName[]; extern const char kAcceleratedVideoDecodeDescription[]; -@@ -1401,13 +1405,17 @@ +@@ -1480,13 +1484,17 @@ extern const char kPermissionPromptPersi #endif // defined(OS_MACOSX) @@ -220,11 +212,9 @@ index 54a4950..5ace5e0 100644 extern const char kAllowTouchpadThreeFingerClickName[]; extern const char kAllowTouchpadThreeFingerClickDescription[]; -diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc -index 122282d..bc102a3 100644 --- a/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc -@@ -105,7 +105,11 @@ +@@ -103,7 +103,11 @@ const GpuFeatureInfo GetGpuFeatureInfo(s {"video_decode", manager->IsFeatureBlacklisted( gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), @@ -236,23 +226,9 @@ index 122282d..bc102a3 100644 "Accelerated video decode has been disabled, either via blacklist," " about:flags or the command line.", true}, -@@ -113,7 +117,11 @@ - {"video_encode", - manager->IsFeatureBlacklisted( - gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE), -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) -+ !command_line.HasSwitch(switches::kEnableAcceleratedVideo), -+#else - command_line.HasSwitch(switches::kDisableWebRtcHWEncoding), -+#endif - "Accelerated video encode has been disabled, either via blacklist," - " about:flags or the command line.", - true}, -diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index 51aa672..963da85 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -717,7 +717,11 @@ +@@ -709,7 +709,11 @@ void GpuDataManagerImplPrivate::AppendRe DCHECK(command_line); if (ShouldDisableAcceleratedVideoDecode(command_line)) @@ -261,24 +237,12 @@ index 51aa672..963da85 100644 +#else command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); +#endif + } - #if defined(USE_AURA) - if (!CanUseGpuBrowserCompositor()) -@@ -748,7 +752,11 @@ - } - - if (ShouldDisableAcceleratedVideoDecode(command_line)) { -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) -+ command_line->AppendSwitch(switches::kEnableAcceleratedVideo); -+#else - command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); -+#endif + void GpuDataManagerImplPrivate::AppendGpuCommandLine( +@@ -810,7 +814,12 @@ void GpuDataManagerImplPrivate::UpdateRe + prefs->accelerated_2d_canvas_enabled = false; } - - #if defined(USE_OZONE) -@@ -826,7 +834,12 @@ - const base::CommandLine* command_line = - base::CommandLine::ForCurrentProcess(); if (!ShouldDisableAcceleratedVideoDecode(command_line) && - !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) @@ -290,10 +254,10 @@ index 51aa672..963da85 100644 prefs->pepper_accelerated_video_decode_enabled = true; } } -@@ -1016,7 +1029,13 @@ - // to resolve crbug/442039 has been collected. - const std::string group_name = base::FieldTrialList::FindFullName( - "DisableAcceleratedVideoDecode"); +@@ -959,7 +968,13 @@ bool GpuDataManagerImplPrivate::UpdateAc + + bool GpuDataManagerImplPrivate::ShouldDisableAcceleratedVideoDecode( + const base::CommandLine* command_line) const { - if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { + if ( +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) @@ -305,36 +269,31 @@ index 51aa672..963da85 100644 // It was already disabled on the command line. return false; } -diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 95d4dff..9b26d3f 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc -@@ -111,7 +111,11 @@ - - // Command-line switches to propagate to the GPU process. - static const char* const kSwitchNames[] = { +@@ -114,13 +114,18 @@ static const char* const kSwitchNames[] + service_manager::switches::kDisableSeccompFilterSandbox, + service_manager::switches::kGpuSandboxAllowSysVShm, + service_manager::switches::kGpuSandboxFailuresFatal, +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) + switches::kEnableAcceleratedVideo, +#else - switches::kDisableAcceleratedVideoDecode, ++ switches::kDisableAcceleratedVideoDecode, +#endif switches::kDisableBreakpad, switches::kDisableGpuRasterization, switches::kDisableGpuSandbox, -@@ -120,7 +124,7 @@ + switches::kDisableGLExtensions, switches::kDisableLogging, - switches::kDisableSeccompFilterSandbox, switches::kDisableShaderNameHashing, -#if BUILDFLAG(ENABLE_WEBRTC) +#if BUILDFLAG(ENABLE_WEBRTC) && !defined(OS_LINUX) switches::kDisableWebRtcHWEncoding, #endif #if defined(OS_WIN) -diff --git a/content/browser/renderer_host/media/video_capture_browsertest.cc b/content/browser/renderer_host/media/video_capture_browsertest.cc -index 8ca0ad0..8c489d0 100644 --- a/content/browser/renderer_host/media/video_capture_browsertest.cc +++ b/content/browser/renderer_host/media/video_capture_browsertest.cc -@@ -155,8 +155,13 @@ +@@ -164,8 +164,13 @@ class VideoCaptureBrowserTest : public C base::CommandLine::ForCurrentProcess()->AppendSwitch( switches::kUseFakeJpegDecodeAccelerator); } else { @@ -346,13 +305,11 @@ index 8ca0ad0..8c489d0 100644 switches::kDisableAcceleratedMjpegDecode); +#endif } - if (params_.use_mojo_service) { - base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( -diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc -index 34afec23..ad77490 100644 + } + --- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc +++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc -@@ -56,15 +56,21 @@ +@@ -64,15 +64,21 @@ void VideoCaptureGpuJpegDecoder::Initial bool is_platform_supported = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kUseFakeJpegDecodeAccelerator); @@ -378,11 +335,9 @@ index 34afec23..ad77490 100644 decoder_status_ = FAILED; RecordInitDecodeUMA_Locked(); return; -diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index fbe4d21..1be295e 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2506,7 +2506,11 @@ +@@ -2526,7 +2526,11 @@ void RenderProcessHostImpl::PropagateBro switches::kDefaultTileHeight, switches::kDisable2dCanvasImageChromium, switches::kDisableAcceleratedJpegDecoding, @@ -394,7 +349,7 @@ index fbe4d21..1be295e 100644 switches::kDisableBackgroundTimerThrottling, switches::kDisableBreakpad, switches::kDisableBrowserSideNavigation, -@@ -2660,8 +2664,10 @@ +@@ -2674,8 +2678,10 @@ void RenderProcessHostImpl::PropagateBro switches::kDisableMojoRenderer, #endif #if BUILDFLAG(ENABLE_WEBRTC) @@ -405,11 +360,9 @@ index fbe4d21..1be295e 100644 switches::kEnableWebRtcSrtpAesGcm, switches::kEnableWebRtcSrtpEncryptedHeaders, switches::kEnableWebRtcStunOrigin, -diff --git a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc -index 3d815a2..2c96048 100644 --- a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc +++ b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc -@@ -58,7 +58,12 @@ +@@ -58,7 +58,12 @@ class WebRtcMediaRecorderTest return; // This flag is also used for encoding, https://crbug.com/616640. base::CommandLine::ForCurrentProcess()->AppendSwitch( @@ -423,11 +376,9 @@ index 3d815a2..2c96048 100644 } private: -diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn -index a5424bb..b68b802 100644 --- a/content/gpu/BUILD.gn +++ b/content/gpu/BUILD.gn -@@ -45,7 +45,6 @@ +@@ -48,7 +48,6 @@ target(link_target_type, "gpu_sources") ] configs += [ "//content:content_implementation" ] @@ -435,20 +386,18 @@ index a5424bb..b68b802 100644 deps = [ "//base", "//base/third_party/dynamic_annotations", -@@ -114,4 +113,8 @@ - if (enable_vulkan) { - deps += [ "//gpu/vulkan" ] +@@ -124,4 +123,8 @@ target(link_target_type, "gpu_sources") + if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build)) { + configs += [ "//build/config/linux/dri" ] } + + if (is_desktop_linux) { + public_configs = [ "//media/gpu:libva_config" ] + } } -diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index 556cf00..730f4ae 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -254,7 +254,7 @@ +@@ -271,7 +271,7 @@ int GpuMain(const MainFunctionParams& pa // Initializes StatisticsRecorder which tracks UMA histograms. base::StatisticsRecorder::Initialize(); @@ -457,7 +406,7 @@ index 556cf00..730f4ae 100644 // Set thread priority before sandbox initialization. base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); #endif -@@ -283,7 +283,7 @@ +@@ -300,7 +300,7 @@ int GpuMain(const MainFunctionParams& pa GetContentClient()->SetGpuInfo(gpu_init->gpu_info()); base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; @@ -466,8 +415,6 @@ index 556cf00..730f4ae 100644 io_thread_priority = base::ThreadPriority::DISPLAY; #endif -diff --git a/content/public/browser/gpu_utils.cc b/content/public/browser/gpu_utils.cc -index 6aafb06..d4ddd8d 100644 --- a/content/public/browser/gpu_utils.cc +++ b/content/public/browser/gpu_utils.cc @@ -7,6 +7,7 @@ @@ -478,9 +425,9 @@ index 6aafb06..d4ddd8d 100644 #include "content/browser/gpu/gpu_process_host.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" -@@ -57,12 +58,19 @@ - gpu_preferences.ui_prioritize_in_gpu_process = - command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess); +@@ -55,12 +56,19 @@ const gpu::GpuPreferences GetGpuPreferen + gpu_preferences.in_process_gpu = + command_line->HasSwitch(switches::kInProcessGPU); gpu_preferences.disable_accelerated_video_decode = +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) + !command_line->HasSwitch(switches::kEnableAcceleratedVideo); @@ -500,11 +447,9 @@ index 6aafb06..d4ddd8d 100644 gpu_preferences.disable_web_rtc_hw_encoding = command_line->HasSwitch(switches::kDisableWebRtcHWEncoding); #endif -diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc -index 4e699d1..3a7a2b7 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc -@@ -89,12 +89,21 @@ +@@ -78,12 +78,21 @@ const char kDisable3DAPIs[] // Disable gpu-accelerated 2d canvas. const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas"; @@ -527,7 +472,7 @@ index 4e699d1..3a7a2b7 100644 // Disables hardware acceleration of video decode, where available. const char kDisableAcceleratedVideoDecode[] = "disable-accelerated-video-decode"; -@@ -932,11 +941,13 @@ +@@ -903,11 +912,13 @@ const char kZygoteProcess[] // ignores this switch on its stable and beta channels. const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption"; @@ -541,11 +486,9 @@ index 4e699d1..3a7a2b7 100644 // Enables negotiation of GCM cipher suites from RFC 7714 for SRTP in WebRTC. // See https://tools.ietf.org/html/rfc7714 for further information. -diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h -index 2704924..67d00bb 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h -@@ -35,7 +35,11 @@ +@@ -33,7 +33,11 @@ CONTENT_EXPORT extern const char kDisabl CONTENT_EXPORT extern const char kDisable3DAPIs[]; CONTENT_EXPORT extern const char kDisableAccelerated2dCanvas[]; CONTENT_EXPORT extern const char kDisableAcceleratedJpegDecoding[]; @@ -557,7 +500,7 @@ index 2704924..67d00bb 100644 CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[]; CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[]; extern const char kDisableBackingStoreLimit[]; -@@ -109,6 +113,9 @@ +@@ -107,6 +111,9 @@ CONTENT_EXPORT extern const char kDisabl CONTENT_EXPORT extern const char kDomAutomationController[]; extern const char kDisable2dCanvasClipAntialiasing[]; CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[]; @@ -567,7 +510,7 @@ index 2704924..67d00bb 100644 CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[]; CONTENT_EXPORT extern const char kEnableAutomation[]; CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[]; -@@ -256,8 +263,10 @@ +@@ -248,8 +255,10 @@ CONTENT_EXPORT extern const char kZygote #if BUILDFLAG(ENABLE_WEBRTC) CONTENT_EXPORT extern const char kDisableWebRtcEncryption[]; @@ -578,11 +521,9 @@ index 2704924..67d00bb 100644 CONTENT_EXPORT extern const char kEnableWebRtcSrtpAesGcm[]; CONTENT_EXPORT extern const char kEnableWebRtcSrtpEncryptedHeaders[]; CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[]; -diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc -index 017056c..825bdce 100644 --- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc +++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc -@@ -239,10 +239,19 @@ +@@ -243,10 +243,19 @@ void PeerConnectionDependencyFactory::In const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) { @@ -603,11 +544,9 @@ index 017056c..825bdce 100644 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); } } -diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index dc01117..2f9ee03 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1456,7 +1456,11 @@ +@@ -1495,7 +1495,11 @@ media::GpuVideoAcceleratorFactories* Ren scoped_refptr<base::SingleThreadTaskRunner> media_task_runner = GetMediaThreadTaskRunner(); const bool enable_video_accelerator = @@ -617,26 +556,11 @@ index dc01117..2f9ee03 100644 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); +#endif const bool enable_gpu_memory_buffer_video_frames = + !is_gpu_compositing_disabled_ && #if defined(OS_MACOSX) || defined(OS_LINUX) - !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) && -diff --git a/gpu/command_buffer/service/gpu_preferences.h b/gpu/command_buffer/service/gpu_preferences.h -index b37c2cc..a721eb7 100644 ---- a/gpu/command_buffer/service/gpu_preferences.h -+++ b/gpu/command_buffer/service/gpu_preferences.h -@@ -50,7 +50,7 @@ - // Disables hardware acceleration of video decode, where available. - bool disable_accelerated_video_decode = false; - --#if defined(OS_CHROMEOS) -+#if defined(OS_CHROMEOS) || defined(OS_LINUX) - // Disables VA-API accelerated video encode. - bool disable_vaapi_accelerated_video_encode = false; - #endif -diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json -index 1289a55..22e11e5 100644 --- a/gpu/config/software_rendering_list.json +++ b/gpu/config/software_rendering_list.json -@@ -374,17 +374,6 @@ +@@ -373,17 +373,6 @@ ] }, { @@ -654,24 +578,9 @@ index 1289a55..22e11e5 100644 "id": 50, "description": "Disable VMware software renderer on older Mesa", "cr_bugs": [145531, 332596, 571899, 629434], -diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn -index 490722c..1cda2fb 100644 ---- a/media/filters/BUILD.gn -+++ b/media/filters/BUILD.gn -@@ -189,7 +189,7 @@ - deps += [ "//media/base/android" ] - } - -- if (current_cpu != "arm" && is_chromeos) { -+ if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) { - sources += [ - "h264_bitstream_buffer.cc", - "h264_bitstream_buffer.h", -diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn -index 729c6fa..4878251 100644 --- a/media/gpu/BUILD.gn +++ b/media/gpu/BUILD.gn -@@ -24,6 +24,14 @@ +@@ -25,6 +25,14 @@ if (is_mac) { import("//build/config/mac/mac_sdk.gni") } @@ -685,22 +594,21 @@ index 729c6fa..4878251 100644 + if (use_vaapi) { action("libva_generate_stubs") { - extra_header = "va_stub_header.fragment" -@@ -334,6 +342,9 @@ - "vaapi_drm_picture.h", - ] + extra_header = "vaapi/va_stub_header.fragment" +@@ -356,6 +364,10 @@ component("gpu") { + if (use_ozone) { + deps += [ "//ui/ozone" ] } ++ + if (is_desktop_linux) { + public_configs = [ ":libva_config" ] + } } if (is_win) { -diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc -index 2cee490..de02414 100644 --- a/media/gpu/gpu_video_decode_accelerator_factory.cc +++ b/media/gpu/gpu_video_decode_accelerator_factory.cc -@@ -87,6 +87,7 @@ +@@ -87,6 +87,7 @@ GpuVideoDecodeAcceleratorFactory::GetDec // profile (instead of calculating a superset). // TODO(posciak,henryhsu): improve this so that we choose a superset of // resolutions and other supported profile parameters. @@ -708,15 +616,3 @@ index 2cee490..de02414 100644 #if defined(OS_WIN) capabilities.supported_profiles = DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences, -diff --git a/media/gpu/vaapi_wrapper.cc b/media/gpu/vaapi_wrapper.cc -index 1e72893..6495642 100644 ---- a/media/gpu/vaapi_wrapper.cc -+++ b/media/gpu/vaapi_wrapper.cc -@@ -1117,6 +1117,7 @@ - if (drm_file.IsValid()) - GetDisplayState()->SetDrmFd(drm_file.GetPlatformFile()); - #endif -+ GetProfileInfos(); // dlopen all necessary libraries - } - - // static diff --git a/chromium-vaapi-rgbx.patch b/chromium-vaapi-rgbx.patch new file mode 100644 index 000000000000..f6e1debf3d06 --- /dev/null +++ b/chromium-vaapi-rgbx.patch @@ -0,0 +1,35 @@ +From 51357dc19efbf30328ca05655fbf69886f6e9113 Mon Sep 17 00:00:00 2001 +From: Julien Isorce <julien.isorce@chromium.org> +Date: Tue, 05 Dec 2017 23:39:45 +0000 +Subject: [PATCH] Allow RGBX for VaapiTFPPicture + +Fixes regression on non-ozone platforms and introduced by + 73d609f366ba6a86324048bbad81527f76d237b5 + https://chromium-review.googlesource.com/787290 + +Note that the format is only used for sanity check. All the logic is +done automatically in the vaapi driver's implementation of vaPutSurface. + +Bug: 785201 +Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel +Change-Id: Idc0bdf184874bf2c238e28da6f42f4e3572e9743 +Reviewed-on: https://chromium-review.googlesource.com/807928 +Reviewed-by: Dan Sanders <sandersd@chromium.org> +Commit-Queue: Julien Isorce <julien.isorce@chromium.org> +Cr-Commit-Position: refs/heads/master@{#521897} +--- + +diff --git a/media/gpu/vaapi/vaapi_tfp_picture.cc b/media/gpu/vaapi/vaapi_tfp_picture.cc +index e9eecce..bd7823c 100644 +--- a/media/gpu/vaapi/vaapi_tfp_picture.cc ++++ b/media/gpu/vaapi/vaapi_tfp_picture.cc +@@ -72,7 +72,8 @@ + bool VaapiTFPPicture::Allocate(gfx::BufferFormat format) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (format != gfx::BufferFormat::BGRX_8888 && +- format != gfx::BufferFormat::BGRA_8888) { ++ format != gfx::BufferFormat::BGRA_8888 && ++ format != gfx::BufferFormat::RGBX_8888) { + DLOG(ERROR) << "Unsupported format"; + return false; + } |