This repository has been archived by the owner on Apr 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
150 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
patches/Bromite/Disable-AImageReader-for-ARM64-P-and-ARM64-Q.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
From: csagan5 <[email protected]> | ||
Date: Thu, 20 Feb 2020 22:44:06 +0100 | ||
Subject: Disable AImageReader for ARM64/P and ARM64/Q | ||
|
||
--- | ||
chrome/browser/android/chrome_startup_flags.cc | 9 +++++++++ | ||
gpu/config/gpu_finch_features.cc | 4 ++++ | ||
media/base/media_switches.cc | 4 ++++ | ||
3 files changed, 17 insertions(+) | ||
|
||
--- a/chrome/browser/android/chrome_startup_flags.cc | ||
+++ b/chrome/browser/android/chrome_startup_flags.cc | ||
@@ -6,6 +6,7 @@ | ||
|
||
#include "chrome/browser/android/chrome_startup_flags.h" | ||
|
||
+#include "base/android/build_info.h" | ||
#include "base/android/jni_android.h" | ||
#include "base/android/jni_string.h" | ||
#include "base/android/scoped_java_ref.h" | ||
@@ -16,6 +17,7 @@ | ||
#include "chrome/common/chrome_switches.h" | ||
#include "components/browser_sync/browser_sync_switches.h" | ||
#include "components/dom_distiller/core/dom_distiller_switches.h" | ||
+#include "content/public/common/content_switches.h" | ||
#include "media/base/media_switches.h" | ||
|
||
namespace { | ||
@@ -40,6 +42,13 @@ void SetChromeSpecificCommandLineFlags() | ||
if (base::SysInfo::IsLowEndDevice()) | ||
SetCommandLineSwitchASCII(switches::kDisableSyncTypes, "Favicon Images"); | ||
|
||
+#ifdef ARCH_CPU_ARM64 | ||
+ // workaround for Android 9/10 crashes on ARM64 CPUs | ||
+ if (base::android::BuildInfo::GetInstance()->sdk_int() >= base::android::SDK_VERSION_P) { | ||
+ SetCommandLineSwitchASCII("disable_aimagereader", "1"); | ||
+ } | ||
+#endif | ||
+ | ||
// Enable DOM Distiller backend. | ||
SetCommandLineSwitch(switches::kEnableDomDistiller); | ||
} | ||
--- a/gpu/config/gpu_finch_features.cc | ||
+++ b/gpu/config/gpu_finch_features.cc | ||
@@ -31,7 +31,11 @@ bool FieldIsInBlacklist(const char* curr | ||
#if defined(OS_ANDROID) | ||
// Use android AImageReader when playing videos with MediaPlayer. | ||
const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer", | ||
+#ifdef ARCH_CPU_ARM64 | ||
+ base::FEATURE_DISABLED_BY_DEFAULT}; | ||
+#else | ||
base::FEATURE_ENABLED_BY_DEFAULT}; | ||
+#endif | ||
|
||
// Use android SurfaceControl API for managing display compositor's buffer queue | ||
// and using overlays on Android. | ||
--- a/media/base/media_switches.cc | ||
+++ b/media/base/media_switches.cc | ||
@@ -491,7 +491,11 @@ const base::Feature kMediaDrmPreprovisio | ||
|
||
// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD) | ||
const base::Feature kAImageReaderVideoOutput{"AImageReaderVideoOutput", | ||
+#ifdef ARCH_CPU_ARM64 | ||
+ base::FEATURE_DISABLED_BY_DEFAULT}; | ||
+#else | ||
base::FEATURE_ENABLED_BY_DEFAULT}; | ||
+#endif | ||
|
||
// Prevents using SurfaceLayer for videos. This is meant to be used by embedders | ||
// that cannot support SurfaceLayer at the moment. |
32 changes: 32 additions & 0 deletions
32
patches/Bromite/Download-on-Android-Q-Remove-a-DCHECK-in-CreateReservation.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From: Xing Liu <[email protected]> | ||
Date: Tue, 18 Feb 2020 21:10:54 +0000 | ||
Subject: Download on Android Q: Remove a DCHECK in CreateReservation. | ||
|
||
When resuming a download, the suggested path can be content URI. This | ||
will hit a DCHECK in CreateReservation. | ||
|
||
Bug: 1045642 | ||
Change-Id: I61c452afafbbc9606f747c84ff18e6b9dc9a0fb6 | ||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062759 | ||
Reviewed-by: Min Qin <[email protected]> | ||
Commit-Queue: Xing Liu <[email protected]> | ||
Cr-Commit-Position: refs/heads/master@{#742270} | ||
--- | ||
.../internal/common/download_path_reservation_tracker.cc | 2 -- | ||
1 file changed, 2 deletions(-) | ||
|
||
diff --git a/components/download/internal/common/download_path_reservation_tracker.cc b/components/download/internal/common/download_path_reservation_tracker.cc | ||
--- a/components/download/internal/common/download_path_reservation_tracker.cc | ||
+++ b/components/download/internal/common/download_path_reservation_tracker.cc | ||
@@ -326,8 +326,6 @@ PathValidationResult ValidatePathAndResolveConflicts( | ||
// - Returns the result of creating the path reservation. | ||
PathValidationResult CreateReservation(const CreateReservationInfo& info, | ||
base::FilePath* reserved_path) { | ||
- DCHECK(info.suggested_path.IsAbsolute()); | ||
- | ||
// Create a reservation map if one doesn't exist. It will be automatically | ||
// deleted when all the reservations are revoked. | ||
if (g_reservation_map == NULL) | ||
-- | ||
2.17.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters