Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5305dedd authored by csagan5's avatar csagan5 Committed by Carl
Browse files

Ported all patches to v108

parent ce0831ac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43,5 +43,6 @@ use_errorprone_java_compiler=false
use_gnome_keyring=false
use_official_google_api_keys=false
use_rtti=false
use_stable_package_name_for_trichrome=false
use_sysroot=false
webview_includes_weblayer=false
+1 −4
Original line number Diff line number Diff line
@@ -129,9 +129,8 @@ Revert-flags-remove-num-raster-threads.patch
webview-Hard-no-to-persistent-histograms.patch
Ignore-enterprise-policies-for-secure-DNS.patch
Add-menu-item-to-bookmark-all-tabs.patch
Ask-user-before-closing-all-tabs.patch
Re-introduce-modal-dialog-flag-to-close-all-tabs.patch
Add-option-to-force-tablet-UI.patch
Make-all-favicon-requests-on-demand.patch
Add-Alt-D-hotkey-to-focus-address-bar.patch
Remove-offline-measurement-background-task.patch
User-agent-customization.patch
@@ -143,7 +142,6 @@ Revert-Delete-block-external-form-redirects.patch
Enable-IntentBlockExternalFormRedirectsNoGesture.patch
Add-flag-to-disable-external-intent-requests.patch
Logcat-crash-reports-UI.patch
API-level-21-prevent-crash-on-download.patch
Add-flag-to-disable-vibration.patch
mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
Client-hints-overrides.patch
@@ -192,7 +190,6 @@ Remove-preload-of-com.google.android.gms.fonts.patch
Partition-Blink-memory-cache.patch
Remove-navigator.connection-info.patch
Disable-PrivacyGuide.patch
Re-introduce-modal-dialog-flag-to-close-all-tabs.patch
sharing-hub-always-use-visible-URL.patch
Re-introduce-kWebAuthCable.patch
Enable-HEVC-by-default.patch
+21 −21
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -2410,9 +2410,9 @@
@@ -2496,9 +2496,9 @@
     "expiry_milestone": 115
   },
   {
@@ -126,9 +126,9 @@ diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_lis
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
--- a/gpu/config/gpu_finch_features.cc
+++ b/gpu/config/gpu_finch_features.cc
@@ -63,6 +63,11 @@ const base::Feature kUseGles2ForOopR {
@@ -64,6 +64,11 @@ BASE_FEATURE(kUseGles2ForOopR,
 #endif
 };
 );
 
+
+// Use android AImageReader when playing videos with MediaPlayer.
@@ -142,13 +142,13 @@ diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
--- a/gpu/config/gpu_finch_features.h
+++ b/gpu/config/gpu_finch_features.h
@@ -17,6 +17,7 @@ namespace features {
 GPU_EXPORT extern const base::Feature kUseGles2ForOopR;
 GPU_EXPORT BASE_DECLARE_FEATURE(kUseGles2ForOopR);
 
 // All features in alphabetical order. The features should be documented
+GPU_EXPORT extern const base::Feature kAImageReaderMediaPlayer;
 // alongside the definition of their values in the .cc file.
 #if BUILDFLAG(IS_ANDROID)
 GPU_EXPORT extern const base::Feature kAndroidSurfaceControl;
 GPU_EXPORT BASE_DECLARE_FEATURE(kAndroidSurfaceControl);
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
--- a/gpu/config/gpu_util.cc
+++ b/gpu/config/gpu_util.cc
@@ -177,7 +177,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list.txt
--- a/gpu/config/gpu_workaround_list.txt
+++ b/gpu/config/gpu_workaround_list.txt
@@ -16,6 +16,7 @@ decode_encode_srgb_for_generatemipmap
@@ -15,6 +15,7 @@ decode_encode_srgb_for_generatemipmap
 depth_stencil_renderbuffer_resize_emulation
 disable_2d_canvas_auto_flush
 disable_accelerated_av1_decode
@@ -188,7 +188,7 @@ diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -640,6 +640,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
@@ -626,6 +626,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
   }
 #endif  // BUILDFLAG(IS_WIN)
 
@@ -231,27 +231,27 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -750,6 +750,10 @@ const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
 // Note: Has no effect if kMediaDrmPreprovisioning feature is disabled.
 const base::Feature kMediaDrmPreprovisioningAtStartup{
     "MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -750,6 +750,10 @@ BASE_FEATURE(kHardwareSecureDecryptionExperiment,
 // Allows automatically disabling hardware secure Content Decryption Module
 // (CDM) after failures or crashes to fallback to software secure CDMs. If this
 // feature is disabled, the fallback will never happen and users could be stuck
+// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD)
+const base::Feature kAImageReaderVideoOutput{"AImageReaderVideoOutput",
+                                             base::FEATURE_ENABLED_BY_DEFAULT};
+
 
 // Enable picture in picture web api for android.
 const base::Feature kPictureInPictureAPI{"PictureInPictureAPI",
 // in playback failures.
 BASE_FEATURE(kHardwareSecureDecryptionFallback,
              "HardwareSecureDecryptionFallback",
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -232,6 +232,7 @@ MEDIA_EXPORT extern const base::Feature kForceHardwareAudioDecoders;
 MEDIA_EXPORT extern const base::Feature kAllowNonSecureOverlays;
 MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
 MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
@@ -232,6 +232,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9kSVCHWEncoding);
 #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy);
+MEDIA_EXPORT extern const base::Feature kAImageReaderVideoOutput;
 MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioning;
 MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioningAtStartup;
 MEDIA_EXPORT extern const base::Feature kCanPlayHls;
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kVp9kSVCHWDecoding);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kWakeLockOptimisationHiddenMuted);
 MEDIA_EXPORT BASE_DECLARE_FEATURE(kWebContentsCaptureHiDpi);
--
2.25.1
+0 −47
Original line number Diff line number Diff line
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 27 Jun 2021 16:53:48 +0200
Subject: API level 21: prevent crash on download

On Lollipop 5.0.x it is not possible to use the system persistent bundle.
This patch ignores boolean settings for them and prevents the crash.

See also: https://github.com/bromite/bromite/issues/1184

License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
 .../BundleToPersistableBundleConverter.java         | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java b/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
--- a/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
+++ b/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
@@ -4,6 +4,7 @@
 
 package org.chromium.components.background_task_scheduler.internal;
 
+import android.os.Build;
 import android.os.Bundle;
 import android.os.PersistableBundle;
 
@@ -82,9 +83,17 @@ class BundleToPersistableBundleConverter {
             if (obj == null) {
                 persistableBundle.putString(key, null);
             } else if (obj instanceof Boolean) {
-                persistableBundle.putBoolean(key, (Boolean) obj);
+                if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
+                    failedKeys.add(key);
+                } else {
+                    persistableBundle.putBoolean(key, (Boolean) obj);
+                }
             } else if (obj instanceof boolean[]) {
-                persistableBundle.putBooleanArray(key, (boolean[]) obj);
+                if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
+                    failedKeys.add(key);
+                } else {
+                    persistableBundle.putBooleanArray(key, (boolean[]) obj);
+                }
             } else if (obj instanceof Double) {
                 persistableBundle.putDouble(key, (Double) obj);
             } else if (obj instanceof double[]) {
--
2.25.1
+0 −60
Original line number Diff line number Diff line
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 16 Dec 2018 15:24:19 +0100
Subject: AV1 codec support

libaom build fixes (requires -fPIC)
Report AV1 as playable on Android

License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
 third_party/libaom/BUILD.gn        | 6 ++++--
 third_party/libaom/libaom_srcs.gni | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
--- a/third_party/libaom/BUILD.gn
+++ b/third_party/libaom/BUILD.gn
@@ -85,7 +85,7 @@ if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) {
       sources += aom_dsp_encoder_asm_sse2_x86_64
       sources += aom_dsp_encoder_asm_ssse3_x86_64
     }
-    defines = [ "CHROMIUM" ]
+    defines = [ "CHROMIUM", "PIC" ]
     include_dirs = libaom_include_dirs
   }
 
@@ -197,7 +197,7 @@ if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
     configs += [ "//build/config/compiler:no_chromium_code" ]
     if (current_cpu == "arm") {
       configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
-      cflags = [ "-mfpu=neon" ]
+      cflags = [ "-mfpu=neon", "-fPIC" ]
     }
     configs += [ ":libaom_config" ]
 
@@ -257,6 +257,8 @@ static_library("libaom") {
   if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
       cpu_arch_full == "arm-neon-cpu-detect") {
     deps += [ ":libaom_intrinsics_neon" ]
+    # will detect CPU
+    sources += aom_ports_arm_sources
   }
   if (current_cpu == "arm64" || current_cpu == "arm") {
     # This is needed by all arm boards due to aom_arm_cpu_caps()
diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs.gni
--- a/third_party/libaom/libaom_srcs.gni
+++ b/third_party/libaom/libaom_srcs.gni
@@ -635,6 +635,11 @@ aom_rc_interface_sources = [
   "//third_party/libaom/source/libaom/test/yuv_video_source.h",
 ]
 
+aom_ports_arm_sources = [
+  "//third_party/libaom/source/libaom/aom_ports/arm_cpudetect.c",
+  "//third_party/libaom/source/libaom/aom_ports/arm.h",
+ ]
+
 aom_rtcd_sources = [
   "//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd.c",
   "//third_party/libaom/source/libaom/aom_scale/aom_scale_rtcd.c",
--
2.25.1
Loading