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

Commit b1209d9f authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '2043-master-update_to_123' into 'master'

Update browser to 123.0.6312.122

See merge request !69
parents a92f3440 72026b7a
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ RUN apt-get update &&\

RUN mkdir ${CHROMIUM_DIR}

RUN curl -s https://raw.githubusercontent.com/chromium/chromium/121.0.6167.164/build/install-build-deps.py \
RUN curl -s https://raw.githubusercontent.com/chromium/chromium/123.0.6312.122/build/install-build-deps.py \
       | python - --android --lib32 --no-chromeos-fonts --no-prompt

RUN git config --global user.name "John Doe"
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ root_dir=$(dirname "$(readlink -f "$0")")
if [ ! -d "$chromium_dir" ]; then
    chromium_dir=$root_dir
fi
chromium_version="121.0.6167.164"
chromium_version="123.0.6312.122"
chromium_code=$(echo "$chromium_version" | tr -d '.' | cut -c5-)
chromium_url=https://github.com/chromium/chromium.git
clean=0
+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ enable_arcore=false
enable_av1_decoder=true
enable_cardboard=false
enable_dav1d_decoder=true
enable_gvr_services=false
enable_hangout_services_extension=false
enable_iterator_debugging=false
enable_mdns=false
+51 −39
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@ See discussions at:

License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
 base/android/android_image_reader_compat.cc      |  8 +++++++-
 base/android/android_image_reader_compat.h       |  4 ++++
 base/android/android_image_reader_compat.cc      | 16 ++++++++++++++++
 base/android/android_image_reader_compat.h       | 14 ++++++++++++++
 chrome/browser/flag-metadata.json                |  6 +++---
 .../AImageReader-CFI-crash-mitigations.inc       |  4 ++++
 .../AImageReader-CFI-crash-mitigations.inc       |  1 +
@@ -30,63 +30,67 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 gpu/config/gpu_finch_features.h                  |  1 +
 gpu/config/gpu_util.cc                           |  8 ++++++++
 gpu/config/gpu_workaround_list.txt               |  1 +
 gpu/ipc/service/gpu_init.cc                      |  7 +++++++
 gpu/ipc/service/gpu_init.cc                      |  8 ++++++++
 gpu/ipc/service/stream_texture_android.cc        | 11 ++++++++++-
 12 files changed, 67 insertions(+), 5 deletions(-)
 12 files changed, 87 insertions(+), 4 deletions(-)
 create mode 100644 cromite_flags/media/base/media_switches_cc/AImageReader-CFI-crash-mitigations.inc
 create mode 100644 cromite_flags/media/base/media_switches_h/AImageReader-CFI-crash-mitigations.inc

diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_image_reader_compat.cc
--- a/base/android/android_image_reader_compat.cc
+++ b/base/android/android_image_reader_compat.cc
@@ -23,6 +23,8 @@
@@ -7,7 +7,23 @@
 namespace base {
 namespace android {
 
+bool AndroidImageReader::disable_support_ = false;
+AndroidImageReader& AndroidImageReader::GetInstance() {
+  // C++11 static local variable initialization is
+  // thread-safe.
+  static AndroidImageReader instance;
+  return instance;
+}
+
 AndroidImageReader& AndroidImageReader::GetInstance() {
   // C++11 static local variable initialization is
   // thread-safe.
@@ -30,8 +32,12 @@ AndroidImageReader& AndroidImageReader::GetInstance() {
   return instance;
 }
 
+void AndroidImageReader::DisableSupport() {
+  disable_support_ = true;
+}
+
 bool AndroidImageReader::IsSupported() {
-  return is_supported_;
+  return !disable_support_ && is_supported_;
 }
 
 AndroidImageReader::AndroidImageReader() : is_supported_(LoadFunctions()) {}
+bool AndroidImageReader::IsSupported() {
+  return !disable_support_;
+}
+
 bool EnableAndroidImageReader() {
+  if (!AndroidImageReader::GetInstance().IsSupported()) return false;
   // Currently we want to enable AImageReader only for android P+ devices.
   if (__builtin_available(android 28, *)) {
     return true;
diff --git a/base/android/android_image_reader_compat.h b/base/android/android_image_reader_compat.h
--- a/base/android/android_image_reader_compat.h
+++ b/base/android/android_image_reader_compat.h
@@ -24,6 +24,9 @@ class BASE_EXPORT AndroidImageReader {
   AndroidImageReader(const AndroidImageReader&) = delete;
   AndroidImageReader& operator=(const AndroidImageReader&) = delete;
@@ -10,6 +10,20 @@
 namespace base {
 namespace android {
 
+class BASE_EXPORT AndroidImageReader {
+ public:
+  // Thread safe GetInstance.
+  static AndroidImageReader& GetInstance();
+
+  bool IsSupported();
+
+  // Disable image reader support.
+  static void DisableSupport();
+  void DisableSupport();
+
   // Check if the image reader usage is supported. This function returns TRUE
   // if android version is >=OREO, image reader support is not disabled and all
   // the required functions are loaded.
@@ -61,6 +64,7 @@ class BASE_EXPORT AndroidImageReader {
   jobject ANativeWindow_toSurface(JNIEnv* env, ANativeWindow* window);
 
  private:
+  static bool disable_support_;
   friend class base::NoDestructor<AndroidImageReader>;
+ private:
+  bool disable_support_ = false;
+};
+
 // Check if the image reader usage is supported.
 BASE_EXPORT bool EnableAndroidImageReader();
 
   AndroidImageReader();
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
@@ -2923,9 +2923,9 @@
@@ -3046,9 +3046,9 @@
     "expiry_milestone": 125
   },
   {
@@ -143,8 +147,8 @@ 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
@@ -71,6 +71,11 @@ BASE_FEATURE(kUseGles2ForOopR,
 );
@@ -65,6 +65,11 @@ BASE_FEATURE(kUseGles2ForOopR,
              base::FEATURE_DISABLED_BY_DEFAULT);
 
 #if BUILDFLAG(IS_ANDROID)
+// Use android AImageReader when playing videos with MediaPlayer.
@@ -179,7 +183,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
   if (!gpu_preferences.enable_android_surface_control)
     return kGpuFeatureStatusDisabled;
 
@@ -355,6 +358,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
@@ -368,6 +371,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
     gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] =
         kGpuFeatureStatusBlocklisted;
   }
@@ -205,14 +209,22 @@ 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
@@ -675,6 +675,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
@@ -65,6 +65,7 @@
 
 #if BUILDFLAG(IS_ANDROID)
 #include "ui/gfx/android/android_surface_control_compat.h"
+#include "base/android/android_image_reader_compat.h"
 #endif
 
 #if BUILDFLAG(ENABLE_VULKAN)
@@ -662,6 +663,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
   }
 #endif  // BUILDFLAG(IS_WIN)
 
+#if BUILDFLAG(IS_ANDROID)
+  // Disable AImageReader if the workaround is enabled.
+  if (gpu_feature_info_.IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
+    base::android::AndroidImageReader::DisableSupport();
+    base::android::AndroidImageReader::GetInstance().DisableSupport();
+  }
+#endif
+
+0 −731

File deleted.

Preview size limit exceeded, changes collapsed.

Loading