mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-09 11:27:32 -03:00
M130 RC
This commit is contained in:
parent
bf73c2a46c
commit
46e478d471
11 changed files with 602 additions and 34 deletions
|
@ -2843,6 +2843,13 @@ config("march_dotprod_fp16") {
|
|||
}
|
||||
}
|
||||
|
||||
config("march_dotprod_i8mm") {
|
||||
if (!is_win || is_clang) {
|
||||
cflags = [ "-march=armv8-a+dotprod+i8mm" ]
|
||||
asmflags = cflags
|
||||
}
|
||||
}
|
||||
|
||||
config("march_dotprod_i8mm_sve") {
|
||||
if (!is_win || is_clang) {
|
||||
cflags = [ "-march=armv8.2-a+dotprod+i8mm+sve" ]
|
||||
|
@ -2869,6 +2876,11 @@ config("march_sve2") {
|
|||
asmflags = cflags
|
||||
}
|
||||
|
||||
config("march_sme") {
|
||||
cflags = [ "-march=armv9-a+sme" ]
|
||||
asmflags = cflags
|
||||
}
|
||||
|
||||
config("default_stack_frames") {
|
||||
if (!is_win) {
|
||||
if (enable_frame_pointers) {
|
||||
|
|
|
@ -71,6 +71,7 @@ process_template() (
|
|||
local TMPLOUT="$2"
|
||||
fi
|
||||
# Process includes first so included text also gets substitutions.
|
||||
# -e "s#@@RECOMMENDS@@#${RECOMMENDS}#g" \
|
||||
TMPLINCL="$(process_template_includes "$TMPLIN")"
|
||||
sed \
|
||||
-e "s#@@PACKAGE@@#${PACKAGE}#g" \
|
||||
|
@ -92,7 +93,6 @@ process_template() (
|
|||
-e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \
|
||||
-e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \
|
||||
-e "s#@@DEPENDS@@#${DEPENDS}#g" \
|
||||
# -e "s#@@RECOMMENDS@@#${RECOMMENDS}#g" \
|
||||
-e "s#@@PROVIDES@@#${PROVIDES}#g" \
|
||||
-e "s#@@ARCHITECTURE@@#${ARCHITECTURE}#g" \
|
||||
-e "s#@@MAINTNAME@@#${MAINTNAME}#g" \
|
||||
|
|
514
arm/third_party/libyuv/BUILD.gn
vendored
Normal file
514
arm/third_party/libyuv/BUILD.gn
vendored
Normal file
|
@ -0,0 +1,514 @@
|
|||
# Copyright 2014 The LibYuv Project Authors. All rights reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
# tree. An additional intellectual property rights grant can be found
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
import("//build/config/compiler_opt.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//testing/test.gni")
|
||||
import("libyuv.gni")
|
||||
|
||||
declare_args() {
|
||||
# Set to false to disable building with absl flags.
|
||||
libyuv_use_absl_flags = true
|
||||
|
||||
# When building a shared library using a target in WebRTC or
|
||||
# Chromium projects that depends on libyuv, setting this flag
|
||||
# to true makes libyuv symbols visible inside that library.
|
||||
libyuv_symbols_visible = false
|
||||
}
|
||||
|
||||
config("libyuv_config") {
|
||||
include_dirs = [ "include" ]
|
||||
if (is_android) {
|
||||
if (target_cpu == "arm" || target_cpu == "x86" || target_cpu == "mipsel") {
|
||||
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
|
||||
} else {
|
||||
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Define CHROMIUM to tell cpu_id to avoid sandbox unsafe system calls.
|
||||
defines = [ "CHROMIUM" ]
|
||||
if (!libyuv_use_neon) {
|
||||
defines += [ "LIBYUV_DISABLE_NEON" ]
|
||||
}
|
||||
if (!libyuv_use_sve) {
|
||||
defines += [ "LIBYUV_DISABLE_SVE" ]
|
||||
}
|
||||
if (!libyuv_use_sme) {
|
||||
defines += [ "LIBYUV_DISABLE_SME" ]
|
||||
}
|
||||
if (libyuv_disable_rvv) {
|
||||
defines += [ "LIBYUV_DISABLE_RVV" ]
|
||||
}
|
||||
if (!libyuv_use_lsx) {
|
||||
defines += [ "LIBYUV_DISABLE_LSX" ]
|
||||
}
|
||||
if (!libyuv_use_lasx) {
|
||||
defines += [ "LIBYUV_DISABLE_LASX" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This target is built when no specific target is specified on the command line.
|
||||
group("default") {
|
||||
testonly = true
|
||||
deps = [ ":libyuv" ]
|
||||
if (libyuv_include_tests) {
|
||||
deps += [
|
||||
":compare",
|
||||
":cpuid",
|
||||
":i444tonv12_eg",
|
||||
":libyuv_unittest",
|
||||
":psnr",
|
||||
":yuvconstants",
|
||||
":yuvconvert",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
group("libyuv") {
|
||||
all_dependent_configs = [ ":libyuv_config" ]
|
||||
deps = []
|
||||
|
||||
if (is_win && target_cpu == "x64") {
|
||||
# Compile with clang in order to get inline assembly
|
||||
public_deps = [ ":libyuv_internal(//build/toolchain/win:win_clang_x64)" ]
|
||||
} else {
|
||||
public_deps = [ ":libyuv_internal" ]
|
||||
}
|
||||
|
||||
if (libyuv_use_neon) {
|
||||
deps += [ ":libyuv_neon" ]
|
||||
}
|
||||
|
||||
if (libyuv_use_sve) {
|
||||
deps += [ ":libyuv_sve" ]
|
||||
}
|
||||
|
||||
if (libyuv_use_sme) {
|
||||
deps += [ ":libyuv_sme" ]
|
||||
}
|
||||
|
||||
if (libyuv_use_msa) {
|
||||
deps += [ ":libyuv_msa" ]
|
||||
}
|
||||
|
||||
if (libyuv_use_lsx) {
|
||||
deps += [ ":libyuv_lsx" ]
|
||||
}
|
||||
|
||||
if (libyuv_use_lasx) {
|
||||
deps += [ ":libyuv_lasx" ]
|
||||
}
|
||||
|
||||
if (!is_ios && !libyuv_disable_jpeg) {
|
||||
# Make sure that clients of libyuv link with libjpeg. This can't go in
|
||||
# libyuv_internal because in Windows x64 builds that will generate a clang
|
||||
# build of libjpeg, and we don't want two copies.
|
||||
deps += [ "//third_party:jpeg" ]
|
||||
}
|
||||
}
|
||||
|
||||
static_library("libyuv_internal") {
|
||||
visibility = [ ":*" ]
|
||||
|
||||
sources = [
|
||||
# Headers
|
||||
"include/libyuv.h",
|
||||
"include/libyuv/basic_types.h",
|
||||
"include/libyuv/compare.h",
|
||||
"include/libyuv/compare_row.h",
|
||||
"include/libyuv/convert.h",
|
||||
"include/libyuv/convert_argb.h",
|
||||
"include/libyuv/convert_from.h",
|
||||
"include/libyuv/convert_from_argb.h",
|
||||
"include/libyuv/cpu_id.h",
|
||||
"include/libyuv/loongson_intrinsics.h",
|
||||
"include/libyuv/macros_msa.h",
|
||||
"include/libyuv/mjpeg_decoder.h",
|
||||
"include/libyuv/planar_functions.h",
|
||||
"include/libyuv/rotate.h",
|
||||
"include/libyuv/rotate_argb.h",
|
||||
"include/libyuv/rotate_row.h",
|
||||
"include/libyuv/row.h",
|
||||
"include/libyuv/scale.h",
|
||||
"include/libyuv/scale_argb.h",
|
||||
"include/libyuv/scale_rgb.h",
|
||||
"include/libyuv/scale_row.h",
|
||||
"include/libyuv/scale_uv.h",
|
||||
"include/libyuv/version.h",
|
||||
"include/libyuv/video_common.h",
|
||||
|
||||
# Source Files
|
||||
"source/compare.cc",
|
||||
"source/compare_common.cc",
|
||||
"source/compare_gcc.cc",
|
||||
"source/compare_win.cc",
|
||||
"source/convert.cc",
|
||||
"source/convert_argb.cc",
|
||||
"source/convert_from.cc",
|
||||
"source/convert_from_argb.cc",
|
||||
"source/convert_jpeg.cc",
|
||||
"source/convert_to_argb.cc",
|
||||
"source/convert_to_i420.cc",
|
||||
"source/cpu_id.cc",
|
||||
"source/mjpeg_decoder.cc",
|
||||
"source/mjpeg_validate.cc",
|
||||
"source/planar_functions.cc",
|
||||
"source/rotate.cc",
|
||||
"source/rotate_any.cc",
|
||||
"source/rotate_argb.cc",
|
||||
"source/rotate_common.cc",
|
||||
"source/rotate_gcc.cc",
|
||||
"source/rotate_win.cc",
|
||||
"source/row_any.cc",
|
||||
"source/row_common.cc",
|
||||
"source/row_gcc.cc",
|
||||
"source/row_rvv.cc",
|
||||
"source/row_win.cc",
|
||||
"source/scale.cc",
|
||||
"source/scale_any.cc",
|
||||
"source/scale_argb.cc",
|
||||
"source/scale_common.cc",
|
||||
"source/scale_gcc.cc",
|
||||
"source/scale_rgb.cc",
|
||||
"source/scale_rvv.cc",
|
||||
"source/scale_uv.cc",
|
||||
"source/scale_win.cc",
|
||||
"source/video_common.cc",
|
||||
]
|
||||
|
||||
configs += [ ":libyuv_config" ]
|
||||
defines = []
|
||||
deps = []
|
||||
|
||||
if (libyuv_symbols_visible) {
|
||||
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
configs += [ "//build/config/gcc:symbol_visibility_default" ]
|
||||
}
|
||||
|
||||
if ((!is_ios || use_blink) && !libyuv_disable_jpeg) {
|
||||
defines += [ "HAVE_JPEG" ]
|
||||
|
||||
# Needed to pull in libjpeg headers. Can't add //third_party:jpeg to deps
|
||||
# because in Windows x64 build it will get compiled with clang.
|
||||
deps += [ "//third_party:jpeg_includes" ]
|
||||
}
|
||||
|
||||
# Always enable optimization for Release and NaCl builds (to workaround
|
||||
# crbug.com/538243).
|
||||
if (!is_debug || is_nacl) {
|
||||
configs -= [ "//build/config/compiler:default_optimization" ]
|
||||
|
||||
# Enable optimize for speed (-O2) over size (-Os).
|
||||
configs += [ "//build/config/compiler:optimize_max" ]
|
||||
}
|
||||
|
||||
# To enable AVX2 or other cpu optimization, pass flag here
|
||||
if (!is_win) {
|
||||
cflags = [
|
||||
"-ffp-contract=fast", # Enable fma vectorization for NEON.
|
||||
]
|
||||
if (use_avx) {
|
||||
cflags += [
|
||||
"-mavx",
|
||||
"-maes",
|
||||
]
|
||||
}
|
||||
if (use_avx2) {
|
||||
cflags += [
|
||||
"-mpopcnt",
|
||||
"-mavx2",
|
||||
"-mfma",
|
||||
"-ffp-contract=fast",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
if (use_avx) {
|
||||
cflags = [
|
||||
"/clang:-mavx",
|
||||
"/clang:-maes",
|
||||
]
|
||||
}
|
||||
if (use_avx2) {
|
||||
cflags += [
|
||||
"/arch:AVX2",
|
||||
"/clang:-mpopcnt",
|
||||
"/clang:-mavx2",
|
||||
"/clang:-mfma",
|
||||
"/clang:-ffp-contract=fast",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (libyuv_use_neon) {
|
||||
static_library("libyuv_neon") {
|
||||
sources = [
|
||||
# ARM Source Files
|
||||
"source/compare_neon.cc",
|
||||
"source/compare_neon64.cc",
|
||||
"source/rotate_neon.cc",
|
||||
"source/rotate_neon64.cc",
|
||||
"source/row_neon.cc",
|
||||
"source/row_neon64.cc",
|
||||
"source/scale_neon.cc",
|
||||
"source/scale_neon64.cc",
|
||||
]
|
||||
|
||||
deps = [ ":libyuv_internal" ]
|
||||
|
||||
public_configs = [ ":libyuv_config" ]
|
||||
|
||||
if (current_cpu == "arm64") {
|
||||
configs += [ "//build/config/compiler:march_dotprod_i8mm" ]
|
||||
} else {
|
||||
configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
|
||||
cflags = [ "-mfpu=neon" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (libyuv_use_sve) {
|
||||
static_library("libyuv_sve") {
|
||||
sources = [ "source/row_sve.cc" ]
|
||||
|
||||
deps = [ ":libyuv_internal" ]
|
||||
|
||||
public_configs = [ ":libyuv_config" ]
|
||||
|
||||
# SVE2 is an Armv9-A feature.
|
||||
configs += [ "//build/config/compiler:march_sve2" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (libyuv_use_sme) {
|
||||
static_library("libyuv_sme") {
|
||||
sources = [ "source/rotate_sme.cc" ]
|
||||
|
||||
deps = [ ":libyuv_internal" ]
|
||||
|
||||
public_configs = [ ":libyuv_config" ]
|
||||
|
||||
# SME is an Armv9-A feature.
|
||||
configs += [ "//build/config/compiler:march_sme" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (libyuv_use_msa) {
|
||||
static_library("libyuv_msa") {
|
||||
sources = [
|
||||
# MSA Source Files
|
||||
"source/compare_msa.cc",
|
||||
"source/rotate_msa.cc",
|
||||
"source/row_msa.cc",
|
||||
"source/scale_msa.cc",
|
||||
]
|
||||
|
||||
deps = [ ":libyuv_internal" ]
|
||||
|
||||
public_configs = [ ":libyuv_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (libyuv_use_lsx) {
|
||||
static_library("libyuv_lsx") {
|
||||
sources = [
|
||||
# LSX Source Files
|
||||
"source/rotate_lsx.cc",
|
||||
"source/row_lsx.cc",
|
||||
"source/scale_lsx.cc",
|
||||
]
|
||||
|
||||
cflags_cc = [
|
||||
"-mlsx",
|
||||
"-Wno-c++11-narrowing",
|
||||
]
|
||||
|
||||
deps = [ ":libyuv_internal" ]
|
||||
|
||||
public_configs = [ ":libyuv_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (libyuv_use_lasx) {
|
||||
static_library("libyuv_lasx") {
|
||||
sources = [
|
||||
# LASX Source Files
|
||||
"source/row_lasx.cc",
|
||||
]
|
||||
|
||||
cflags_cc = [
|
||||
"-mlasx",
|
||||
"-Wno-c++11-narrowing",
|
||||
]
|
||||
|
||||
deps = [ ":libyuv_internal" ]
|
||||
|
||||
public_configs = [ ":libyuv_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (libyuv_include_tests) {
|
||||
config("libyuv_unittest_warnings_config") {
|
||||
if (!is_win) {
|
||||
cflags = [
|
||||
# TODO(fbarchard): Fix sign and unused variable warnings.
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-unused-variable",
|
||||
]
|
||||
}
|
||||
if (is_win) {
|
||||
cflags = [
|
||||
"/wd4245", # signed/unsigned mismatch
|
||||
"/wd4189", # local variable is initialized but not referenced
|
||||
]
|
||||
}
|
||||
}
|
||||
config("libyuv_unittest_config") {
|
||||
defines = [ "GTEST_RELATIVE_PATH" ]
|
||||
}
|
||||
|
||||
test("libyuv_unittest") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"unit_test/basictypes_test.cc",
|
||||
"unit_test/color_test.cc",
|
||||
"unit_test/compare_test.cc",
|
||||
"unit_test/convert_argb_test.cc",
|
||||
"unit_test/convert_test.cc",
|
||||
"unit_test/cpu_test.cc",
|
||||
"unit_test/cpu_thread_test.cc",
|
||||
"unit_test/math_test.cc",
|
||||
"unit_test/planar_test.cc",
|
||||
"unit_test/rotate_argb_test.cc",
|
||||
"unit_test/rotate_test.cc",
|
||||
"unit_test/scale_argb_test.cc",
|
||||
"unit_test/scale_plane_test.cc",
|
||||
"unit_test/scale_rgb_test.cc",
|
||||
"unit_test/scale_test.cc",
|
||||
"unit_test/scale_uv_test.cc",
|
||||
"unit_test/unit_test.cc",
|
||||
"unit_test/unit_test.h",
|
||||
"unit_test/video_common_test.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":libyuv",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
defines = []
|
||||
if (libyuv_use_absl_flags) {
|
||||
defines += [ "LIBYUV_USE_ABSL_FLAGS" ]
|
||||
deps += [
|
||||
"//third_party/abseil-cpp/absl/flags:flag",
|
||||
"//third_party/abseil-cpp/absl/flags:parse",
|
||||
]
|
||||
}
|
||||
|
||||
configs += [ ":libyuv_unittest_warnings_config" ]
|
||||
|
||||
public_deps = [ "//testing/gtest" ]
|
||||
public_configs = [ ":libyuv_unittest_config" ]
|
||||
|
||||
if (is_linux || is_chromeos) {
|
||||
cflags = [ "-fexceptions" ]
|
||||
}
|
||||
if (is_ios) {
|
||||
configs -= [ "//build/config/compiler:default_symbols" ]
|
||||
configs += [ "//build/config/compiler:symbols" ]
|
||||
cflags = [ "-Wno-sometimes-uninitialized" ]
|
||||
}
|
||||
if (!is_ios && !libyuv_disable_jpeg) {
|
||||
defines += [ "HAVE_JPEG" ]
|
||||
}
|
||||
if (is_android) {
|
||||
deps += [ "//testing/android/native_test:native_test_native_code" ]
|
||||
}
|
||||
|
||||
# TODO(YangZhang): These lines can be removed when high accuracy
|
||||
# YUV to RGB to Neon is ported.
|
||||
if ((target_cpu == "armv7" || target_cpu == "armv7s" ||
|
||||
(target_cpu == "arm" && arm_version >= 7) || target_cpu == "arm64") &&
|
||||
(arm_use_neon || arm_optionally_use_neon)) {
|
||||
defines += [ "LIBYUV_NEON" ]
|
||||
}
|
||||
|
||||
defines += [
|
||||
# Enable the following 3 macros to turn off assembly for specified CPU.
|
||||
# "LIBYUV_DISABLE_X86",
|
||||
# "LIBYUV_DISABLE_NEON",
|
||||
# Enable the following macro to build libyuv as a shared library (dll).
|
||||
# "LIBYUV_USING_SHARED_LIBRARY"
|
||||
]
|
||||
}
|
||||
|
||||
executable("compare") {
|
||||
sources = [
|
||||
# sources
|
||||
"util/compare.cc",
|
||||
]
|
||||
deps = [ ":libyuv" ]
|
||||
if (is_linux || is_chromeos) {
|
||||
cflags = [ "-fexceptions" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("yuvconvert") {
|
||||
sources = [
|
||||
# sources
|
||||
"util/yuvconvert.cc",
|
||||
]
|
||||
deps = [ ":libyuv" ]
|
||||
if (is_linux || is_chromeos) {
|
||||
cflags = [ "-fexceptions" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("yuvconstants") {
|
||||
sources = [
|
||||
# sources
|
||||
"util/yuvconstants.c",
|
||||
]
|
||||
deps = [ ":libyuv" ]
|
||||
if (is_linux || is_chromeos) {
|
||||
cflags = [ "-fexceptions" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("psnr") {
|
||||
sources = [
|
||||
# sources
|
||||
"util/psnr.cc",
|
||||
"util/psnr_main.cc",
|
||||
"util/ssim.cc",
|
||||
]
|
||||
deps = [ ":libyuv" ]
|
||||
|
||||
if (!is_ios && !libyuv_disable_jpeg) {
|
||||
defines = [ "HAVE_JPEG" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("i444tonv12_eg") {
|
||||
sources = [
|
||||
# sources
|
||||
"util/i444tonv12_eg.cc",
|
||||
]
|
||||
deps = [ ":libyuv" ]
|
||||
}
|
||||
|
||||
executable("cpuid") {
|
||||
sources = [
|
||||
# sources
|
||||
"util/cpuid.c",
|
||||
]
|
||||
deps = [ ":libyuv" ]
|
||||
}
|
||||
}
|
|
@ -2498,7 +2498,7 @@ index b071682471a32..94123478b7fab 100644
|
|||
// uses for sizing as suggested as an initial fix by UI. Discuss a more formal
|
||||
// solution.
|
||||
- constexpr int kMaxChromeLabsHeightDp = 448;
|
||||
+ constexpr int kMaxChromeLabsHeightDp = 550;
|
||||
+ constexpr int kMaxChromeLabsHeightDp = 560;
|
||||
auto scroll_view = std::make_unique<views::ScrollView>(
|
||||
views::ScrollView::ScrollWithLayers::kEnabled);
|
||||
// TODO(elainechien): Check with UI whether we want to draw overflow
|
||||
|
@ -2929,6 +2929,32 @@ index d1a8dc8342177..a407f00138376 100644
|
|||
inline constexpr char kChromeUIAboutHost[] = "about";
|
||||
inline constexpr char kChromeUIAboutURL[] = "chrome://about/";
|
||||
inline constexpr char kChromeUIAccessCodeCastHost[] = "access-code-cast";
|
||||
diff --git a/components/lens/lens_features.cc b/components/lens/lens_features.cc
|
||||
index e821793248fe3..9a890315945d7 100644
|
||||
--- a/components/lens/lens_features.cc
|
||||
+++ b/components/lens/lens_features.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/metrics/field_trial_params.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "chrome/browser/ui/thorium_2024.h"
|
||||
|
||||
namespace lens::features {
|
||||
|
||||
@@ -44,12 +45,7 @@ BASE_FEATURE(kEnableContextMenuInLensSidePanel,
|
||||
|
||||
BASE_FEATURE(kLensOverlay,
|
||||
"LensOverlay",
|
||||
-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT
|
||||
-#else
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
-#endif
|
||||
-);
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kLensOverlayTranslateButton,
|
||||
"LensOverlayTranslateButton",
|
||||
diff --git a/components/resources/search_engine_choice_scaled_resources.grdp b/components/resources/search_engine_choice_scaled_resources.grdp
|
||||
index 87d186a04e66c..01beccd365540 100644
|
||||
--- a/components/resources/search_engine_choice_scaled_resources.grdp
|
||||
|
@ -3032,7 +3058,7 @@ index d21456ab73faa..de14c868fcc26 100644
|
|||
return SystemTheme::kDefault;
|
||||
}
|
||||
diff --git a/ui/views/controls/button/toggle_button.cc b/ui/views/controls/button/toggle_button.cc
|
||||
index 1380921296fcf..9410570b9bb83 100644
|
||||
index 1380921296fcf..cacb1c78add37 100644
|
||||
--- a/ui/views/controls/button/toggle_button.cc
|
||||
+++ b/ui/views/controls/button/toggle_button.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
|
@ -3043,28 +3069,26 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
#include "third_party/skia/include/core/SkRect.h"
|
||||
#include "ui/accessibility/ax_enums.mojom.h"
|
||||
#include "ui/accessibility/ax_node_data.h"
|
||||
@@ -42,6 +43,11 @@ namespace {
|
||||
@@ -42,6 +43,13 @@ namespace {
|
||||
|
||||
// Constants are measured in dip.
|
||||
constexpr gfx::Size kTrackSize = gfx::Size(26, 16);
|
||||
+constexpr gfx::Size kTh24TrackSize = gfx::Size(30, 12);
|
||||
+
|
||||
+constexpr int kTrackVerticalMargin = 5;
|
||||
+constexpr int kTrackHorizontalMargin = 6;
|
||||
+// Inset from the rounded edge of the thumb to the rounded edge of the track.
|
||||
+
|
||||
+// Insets from the rounded edge of the thumb to the rounded edge of the track.
|
||||
+constexpr int kTh24ThumbInset = 2;
|
||||
constexpr int kThumbInset = -4;
|
||||
constexpr int kThumbInsetSelected = -2;
|
||||
constexpr int kThumbPressedOutset = 1;
|
||||
@@ -49,11 +55,19 @@ constexpr int kHoverDiameter = 20;
|
||||
@@ -49,11 +57,15 @@ constexpr int kHoverDiameter = 20;
|
||||
constexpr float kBorderStrokeWidth = 1.0f;
|
||||
|
||||
const gfx::Size GetTrackSize() {
|
||||
- return kTrackSize;
|
||||
+ if (features::IsThorium2024()) {
|
||||
+ return kTh24TrackSize;
|
||||
+ } else {
|
||||
+ return kTrackSize;
|
||||
+ }
|
||||
+ return features::IsThorium2024() ? kTh24TrackSize : kTrackSize;
|
||||
}
|
||||
|
||||
int GetThumbInset(bool is_on) {
|
||||
|
@ -3077,7 +3101,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
}
|
||||
|
||||
std::optional<SkColor> GetSkColorFromVariant(
|
||||
@@ -148,7 +162,7 @@ class ToggleButton::ThumbView : public View {
|
||||
@@ -148,7 +160,7 @@ class ToggleButton::ThumbView : public View {
|
||||
ConvertVariantToSkColor(thumb_off_color_, color_provider);
|
||||
SkColor thumb_color =
|
||||
color_utils::AlphaBlend(thumb_on_color, thumb_off_color, color_ratio_);
|
||||
|
@ -3086,7 +3110,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
// This will blend and additional color into the "on" state thumb color
|
||||
// while the view is hovered. This will also take into account both the
|
||||
// off->on color animating along with the hover animation. Those
|
||||
@@ -208,7 +222,7 @@ class ToggleButton::ThumbView : public View {
|
||||
@@ -208,7 +220,7 @@ class ToggleButton::ThumbView : public View {
|
||||
};
|
||||
|
||||
ToggleButton::ToggleButton(PressedCallback callback)
|
||||
|
@ -3095,7 +3119,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
|
||||
ToggleButton::ToggleButton(PressedCallback callback, bool has_thumb_shadow)
|
||||
: Button(std::move(callback)) {
|
||||
@@ -225,14 +239,17 @@ ToggleButton::ToggleButton(PressedCallback callback, bool has_thumb_shadow)
|
||||
@@ -225,14 +237,17 @@ ToggleButton::ToggleButton(PressedCallback callback, bool has_thumb_shadow)
|
||||
// InkDrop event triggering is handled in NotifyClick().
|
||||
SetHasInkDropActionOnClick(false);
|
||||
InkDrop::UseInkDropForSquareRipple(InkDrop::Get(this),
|
||||
|
@ -3115,7 +3139,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
const SkColor pressed_color = host->GetPressedColor();
|
||||
const float pressed_alpha = SkColorGetA(pressed_color);
|
||||
std::unique_ptr<SquareInkDropRipple> ripple =
|
||||
@@ -251,20 +268,22 @@ ToggleButton::ToggleButton(PressedCallback callback, bool has_thumb_shadow)
|
||||
@@ -251,20 +266,22 @@ ToggleButton::ToggleButton(PressedCallback callback, bool has_thumb_shadow)
|
||||
return host->GetTrackColor(host->GetIsOn() || host->HasFocus());
|
||||
},
|
||||
this));
|
||||
|
@ -3152,18 +3176,18 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
|
||||
// Even though ToggleButton doesn't paint anything, declare us as flipped in
|
||||
// RTL mode so that FocusRing correctly flips as well.
|
||||
@@ -370,6 +389,10 @@ bool ToggleButton::GetAcceptsEvents() const {
|
||||
@@ -370,6 +387,10 @@ bool ToggleButton::GetAcceptsEvents() const {
|
||||
return accepts_events_;
|
||||
}
|
||||
|
||||
+int ToggleButton::GetVisualHorizontalMargin() const {
|
||||
+ return kTrackHorizontalMargin - kThumbInset;
|
||||
+ return kTrackHorizontalMargin - kTh24ThumbInset;
|
||||
+}
|
||||
+
|
||||
void ToggleButton::AddLayerToRegion(ui::Layer* layer,
|
||||
views::LayerRegion region) {
|
||||
// Ink-drop layers should go above/below the ThumbView.
|
||||
@@ -383,6 +406,9 @@ void ToggleButton::RemoveLayerFromRegions(ui::Layer* layer) {
|
||||
@@ -383,6 +404,9 @@ void ToggleButton::RemoveLayerFromRegions(ui::Layer* layer) {
|
||||
gfx::Size ToggleButton::CalculatePreferredSize(
|
||||
const SizeBounds& /*available_size*/) const {
|
||||
gfx::Rect rect(GetTrackSize());
|
||||
|
@ -3173,7 +3197,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
rect.Inset(-GetInsets());
|
||||
return rect.size();
|
||||
}
|
||||
@@ -402,7 +428,7 @@ gfx::Rect ToggleButton::GetThumbBounds() const {
|
||||
@@ -402,7 +426,7 @@ gfx::Rect ToggleButton::GetThumbBounds() const {
|
||||
// The thumb is a circle, so the width should match the height.
|
||||
thumb_bounds.set_width(thumb_bounds.height());
|
||||
thumb_bounds.Inset(thumb_view_->GetShadowOutsets());
|
||||
|
@ -3182,7 +3206,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
thumb_bounds.Outset(kThumbPressedOutset);
|
||||
}
|
||||
return thumb_bounds;
|
||||
@@ -417,7 +443,7 @@ void ToggleButton::UpdateThumb() {
|
||||
@@ -417,7 +441,7 @@ void ToggleButton::UpdateThumb() {
|
||||
static_cast<float>(slide_animation_.GetCurrentValue()),
|
||||
static_cast<float>(hover_animation_.GetCurrentValue()),
|
||||
GetIsOn(), IsMouseHovered());
|
||||
|
@ -3191,7 +3215,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
InkDrop::Get(this)->GetInkDrop()->SetHovered(
|
||||
!slide_animation_.is_animating());
|
||||
}
|
||||
@@ -458,8 +484,10 @@ void ToggleButton::OnThemeChanged() {
|
||||
@@ -458,8 +482,10 @@ void ToggleButton::OnThemeChanged() {
|
||||
void ToggleButton::NotifyClick(const ui::Event& event) {
|
||||
AnimateIsOn(!GetIsOn());
|
||||
|
||||
|
@ -3204,7 +3228,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
|
||||
Button::NotifyClick(event);
|
||||
}
|
||||
@@ -482,27 +510,59 @@ void ToggleButton::StateChanged(ButtonState old_state) {
|
||||
@@ -482,27 +508,59 @@ void ToggleButton::StateChanged(ButtonState old_state) {
|
||||
thumb_view_->SetEnabled(enabled);
|
||||
|
||||
// Update thumb bounds.
|
||||
|
@ -3276,7 +3300,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
void ToggleButton::PaintButtonContents(gfx::Canvas* canvas) {
|
||||
// Paint the toggle track. To look sharp even at fractional scale factors,
|
||||
// round up to pixel boundaries.
|
||||
@@ -519,7 +579,7 @@ void ToggleButton::PaintButtonContents(gfx::Canvas* canvas) {
|
||||
@@ -519,7 +577,7 @@ void ToggleButton::PaintButtonContents(gfx::Canvas* canvas) {
|
||||
track_flags.setColor(color_utils::AlphaBlend(
|
||||
GetTrackColor(true), GetTrackColor(false), color_ratio));
|
||||
canvas->DrawRoundRect(track_rect, radius, track_flags);
|
||||
|
@ -3285,7 +3309,7 @@ index 1380921296fcf..9410570b9bb83 100644
|
|||
track_rect.Inset(kBorderStrokeWidth * dsf / 2.0f);
|
||||
track_flags.setColor(
|
||||
GetColorProvider()->GetColor(ui::kColorToggleButtonShadow));
|
||||
@@ -531,7 +591,7 @@ void ToggleButton::PaintButtonContents(gfx::Canvas* canvas) {
|
||||
@@ -531,7 +589,7 @@ void ToggleButton::PaintButtonContents(gfx::Canvas* canvas) {
|
||||
}
|
||||
|
||||
void ToggleButton::AnimationEnded(const gfx::Animation* animation) {
|
||||
|
|
|
@ -2843,6 +2843,13 @@ config("march_dotprod_fp16") {
|
|||
}
|
||||
}
|
||||
|
||||
config("march_dotprod_i8mm") {
|
||||
if (!is_win || is_clang) {
|
||||
cflags = [ "-march=armv8-a+dotprod+i8mm" ]
|
||||
asmflags = cflags
|
||||
}
|
||||
}
|
||||
|
||||
config("march_dotprod_i8mm_sve") {
|
||||
if (!is_win || is_clang) {
|
||||
cflags = [ "-march=armv8.2-a+dotprod+i8mm+sve" ]
|
||||
|
@ -2869,6 +2876,11 @@ config("march_sve2") {
|
|||
asmflags = cflags
|
||||
}
|
||||
|
||||
config("march_sme") {
|
||||
cflags = [ "-march=armv9-a+sme" ]
|
||||
asmflags = cflags
|
||||
}
|
||||
|
||||
config("default_stack_frames") {
|
||||
if (!is_win) {
|
||||
if (enable_frame_pointers) {
|
||||
|
|
|
@ -77,12 +77,6 @@ enum class SecureDnsModeDetailsForHistogram {
|
|||
kMaxValue = kSecureByEnterprisePolicy,
|
||||
};
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
bool ShouldDisableDohForWindowsParentalControls() {
|
||||
return false;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
// Check the AsyncDns field trial and return true if it should be enabled. On
|
||||
// Android this includes checking the Android version in the field trial.
|
||||
bool ShouldEnableAsyncDns() {
|
||||
|
|
|
@ -71,6 +71,7 @@ process_template() (
|
|||
local TMPLOUT="$2"
|
||||
fi
|
||||
# Process includes first so included text also gets substitutions.
|
||||
# -e "s#@@RECOMMENDS@@#${RECOMMENDS}#g" \
|
||||
TMPLINCL="$(process_template_includes "$TMPLIN")"
|
||||
sed \
|
||||
-e "s#@@PACKAGE@@#${PACKAGE}#g" \
|
||||
|
@ -92,7 +93,6 @@ process_template() (
|
|||
-e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \
|
||||
-e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \
|
||||
-e "s#@@DEPENDS@@#${DEPENDS}#g" \
|
||||
# -e "s#@@RECOMMENDS@@#${RECOMMENDS}#g" \
|
||||
-e "s#@@PROVIDES@@#${PROVIDES}#g" \
|
||||
-e "s#@@ARCHITECTURE@@#${ARCHITECTURE}#g" \
|
||||
-e "s#@@MAINTNAME@@#${MAINTNAME}#g" \
|
||||
|
|
|
@ -274,7 +274,7 @@ COMMON_DEPS=$(sed ':a;N;$!ba;s/\n/, /g' "${DEB_COMMON_DEPS}")
|
|||
COMMON_PREDEPS="dpkg (>= 1.14.0)"
|
||||
# MANUAL_RECOMMENDS="${SCRIPTDIR}/manual_recommends"
|
||||
# COMMON_RECOMMENDS=$(grep -v ^$ "${MANUAL_RECOMMENDS}" | grep -v ^# |
|
||||
sed ':a;N;$!ba;s/\n/, /g')
|
||||
# sed ':a;N;$!ba;s/\n/, /g')
|
||||
|
||||
# Make everything happen in the OUTPUTDIR.
|
||||
cd "${OUTPUTDIR}"
|
||||
|
|
|
@ -223,7 +223,14 @@ bool IsAudioCodecProprietary(AudioCodec codec) {
|
|||
#endif // !BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||
|
||||
bool IsHevcProfileSupported(const VideoType& type) {
|
||||
return true;
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (base::FeatureList::IsEnabled(kBuiltInH264Decoder)) {
|
||||
return true;
|
||||
}
|
||||
return GetSupplementalProfileCache()->IsProfileSupported(type.profile);
|
||||
#else
|
||||
return true;
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
}
|
||||
|
||||
bool IsVp9ProfileSupported(const VideoType& type) {
|
||||
|
@ -417,7 +424,10 @@ bool IsDefaultSupportedAudioType(const AudioType& type) {
|
|||
|
||||
bool IsBuiltInVideoCodec(VideoCodec codec) {
|
||||
#if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) && BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||
if (codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) {
|
||||
// Android does bundle `FFMpegVideoDecoder` for `non-arm32` devices,
|
||||
// but not enabled by default.
|
||||
if ((codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) &&
|
||||
base::FeatureList::IsEnabled(kBuiltInH264Decoder)) {
|
||||
return true;
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) &&
|
||||
|
|
|
@ -88,6 +88,8 @@ static const char* GetAllowedDemuxers() {
|
|||
"flac", "mp3", "mov"};
|
||||
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||
allowed_demuxers.push_back("aac");
|
||||
allowed_demuxers.push_back("ac3");
|
||||
allowed_demuxers.push_back("eac3");
|
||||
#endif
|
||||
return base::JoinString(allowed_demuxers, ",");
|
||||
}());
|
||||
|
|
0
src/third_party/widevine/cdm/linux/x64/libwidevinecdm.so
vendored
Normal file → Executable file
0
src/third_party/widevine/cdm/linux/x64/libwidevinecdm.so
vendored
Normal file → Executable file
Loading…
Reference in a new issue