Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Maintenance:9317
chromium.openSUSE_Backports_SLE-12-SP2
chromium-vaapi.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File chromium-vaapi.patch of Package chromium.openSUSE_Backports_SLE-12-SP2
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 0faee72af1c4..8592e86c2b33 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -1795,7 +1795,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) @@ -2454,12 +2454,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 {"v8-cache-options", flag_descriptions::kV8CacheOptionsName, flag_descriptions::kV8CacheOptionsDescription, kOsAll, MULTI_VALUE_TYPE(kV8CacheOptionsChoices)}, diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 69887814c701..9cea71d16c57 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc @@ -3010,7 +3010,7 @@ const char kTextSuggestionsTouchBarDescription[] = // Chrome OS ------------------------------------------------------------------- -#if defined(OS_CHROMEOS) +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) const char kAcceleratedMjpegDecodeName[] = "Hardware-accelerated mjpeg decode for captured frame"; @@ -3557,7 +3557,7 @@ const char kWakeOnPacketsName[] = "Wake On Packets"; const char kWakeOnPacketsDescription[] = "Enables waking the device based on the receipt of some network packets."; -#endif // defined(OS_CHROMEOS) +#endif // defined(OS_CHROMEOS) || BUILDFLAG(USE_VAAPI) // Random platform combinations ----------------------------------------------- diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index d80c51660ae5..1eae73713506 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h @@ -1827,13 +1827,17 @@ extern const char kPermissionPromptPersistenceToggleDescription[]; #endif // defined(OS_MACOSX) -// Chrome OS ------------------------------------------------------------------ - -#if defined(OS_CHROMEOS) +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) extern const char kAcceleratedMjpegDecodeName[]; extern const char kAcceleratedMjpegDecodeDescription[]; +#endif + +// Chrome OS ------------------------------------------------------------------ + +#if defined(OS_CHROMEOS) + extern const char kAllowTouchpadThreeFingerClickName[]; extern const char kAllowTouchpadThreeFingerClickDescription[]; diff --git a/components/viz/service/main/viz_main_impl.cc b/components/viz/service/main/viz_main_impl.cc index 6f5f55de7588..62f42c240219 100644 --- a/components/viz/service/main/viz_main_impl.cc +++ b/components/viz/service/main/viz_main_impl.cc @@ -41,7 +41,7 @@ std::unique_ptr<base::Thread> CreateAndStartIOThread() { // It should be possible to use |main_task_runner_| for doing IO tasks. base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); thread_options.priority = base::ThreadPriority::NORMAL; -#if defined(OS_ANDROID) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_CHROMEOS) // TODO(reveman): Remove this in favor of setting it explicitly for each // type of process. thread_options.priority = base::ThreadPriority::DISPLAY; diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn index 8974e441d1ba..af7c57f3963c 100644 --- a/content/gpu/BUILD.gn +++ b/content/gpu/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/jumbo.gni") import("//build/config/ui.gni") import("//gpu/vulkan/features.gni") import("//media/media_options.gni") +import("//media/gpu/args.gni") import("//ui/ozone/ozone.gni") # See //content/BUILD.gn for how this works. @@ -49,7 +50,6 @@ target(link_target_type, "gpu_sources") { ] configs += [ "//content:content_implementation" ] - deps = [ "//base", "//base/third_party/dynamic_annotations", @@ -134,4 +134,8 @@ target(link_target_type, "gpu_sources") { (!is_chromecast || is_cast_desktop_build)) { configs += [ "//build/config/linux/dri" ] } + + if (is_desktop_linux && use_vaapi) { + public_configs = [ "//media/gpu:libva_config" ] + } } diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index 8397889b61e2..2632f3976377 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -284,7 +284,7 @@ int GpuMain(const MainFunctionParams& parameters) { base::PlatformThread::SetName("CrGpuMain"); -#if defined(OS_ANDROID) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_CHROMEOS) // Set thread priority before sandbox initialization. base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); #endif @@ -317,7 +317,7 @@ int GpuMain(const MainFunctionParams& parameters) { GetContentClient()->SetGpuInfo(gpu_init->gpu_info()); base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; -#if defined(OS_ANDROID) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_CHROMEOS) io_thread_priority = base::ThreadPriority::DISPLAY; #endif diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json index cb6118b6a4ec..7b8ea0f75881 100644 --- a/gpu/config/software_rendering_list.json +++ b/gpu/config/software_rendering_list.json @@ -369,17 +369,6 @@ "all" ] }, - { - "id": 48, - "description": "Accelerated video decode is unavailable on Linux", - "cr_bugs": [137247], - "os": { - "type": "linux" - }, - "features": [ - "accelerated_video_decode" - ] - }, { "id": 50, "description": "Disable VMware software renderer on older Mesa", diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc index f5b922f73cd3..916a746de835 100644 --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc @@ -499,7 +499,7 @@ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() { switches::kUseFakeJpegDecodeAccelerator)) { return true; } -#if defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) return true; #endif return false; diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn index d558b537a0a4..8e387d8203ac 100644 --- a/media/filters/BUILD.gn +++ b/media/filters/BUILD.gn @@ -5,6 +5,7 @@ import("//build/config/jumbo.gni") import("//media/media_options.gni") import("//third_party/libaom/options.gni") +import("//media/gpu/args.gni") jumbo_source_set("filters") { # Do not expand the visibility here without double-checking with OWNERS, this @@ -200,7 +201,7 @@ jumbo_source_set("filters") { deps += [ "//media/base/android" ] } - if (current_cpu != "arm" && is_linux) { + if (use_vaapi) { sources += [ "h264_bitstream_buffer.cc", "h264_bitstream_buffer.h", diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn index 07bfdefda523..7e33cd747614 100644 --- a/media/gpu/BUILD.gn +++ b/media/gpu/BUILD.gn @@ -508,6 +508,12 @@ if (use_v4l2_codec || use_vaapi || is_mac || is_win) { } } +import("//build/config/linux/pkg_config.gni") + +pkg_config("libva_config") { + packages = [ "libva" ] +} + if (use_vaapi) { test("jpeg_encode_accelerator_unittest") { deps = [ @@ -578,6 +584,7 @@ if (is_chromeos || is_linux) { if (use_ozone) { deps += [ "//ui/ozone" ] } + public_configs = [ ":libva_config" ] } } diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc index 67ba4daed787..8815ba896a45 100644 --- a/media/gpu/gpu_video_decode_accelerator_factory.cc +++ b/media/gpu/gpu_video_decode_accelerator_factory.cc @@ -56,6 +56,7 @@ gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilitiesInternal( // profile (instead of calculating a superset). // TODO(posciak,henryhsu): improve this so that we choose a superset of // resolutions and other supported profile parameters. + DVLOG(1) << "Get Supported profiles"; VideoDecodeAccelerator::Capabilities capabilities; #if defined(OS_WIN) capabilities.supported_profiles = diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc index 34a733c4a9c0..72a1816743cd 100644 --- a/media/gpu/vaapi/vaapi_wrapper.cc +++ b/media/gpu/vaapi/vaapi_wrapper.cc @@ -339,7 +339,7 @@ bool VADisplayState::InitializeOnce() { DVLOG(1) << "VAAPI version: " << major_version << "." << minor_version << " " << va_vendor_string_; - if (major_version != VA_MAJOR_VERSION || minor_version != VA_MINOR_VERSION) { + if (major_version != VA_MAJOR_VERSION) { LOG(ERROR) << "This build of Chromium requires VA-API version " << VA_MAJOR_VERSION << "." << VA_MINOR_VERSION << ", system version: " << major_version << "." << minor_version; @@ -969,7 +969,11 @@ scoped_refptr<VASurface> VaapiWrapper::CreateVASurfaceForPixmap( } va_attrib_extbuf.num_planes = num_planes; +#if VA_CHECK_VERSION(1, 0, 0) + std::vector<uintptr_t> fds(num_fds); +#else std::vector<unsigned long> fds(num_fds); +#endif for (size_t i = 0; i < num_fds; ++i) { int dmabuf_fd = pixmap->GetDmaBufFd(i); if (dmabuf_fd < 0) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor