forked from pool/ungoogled-chromium
Compare commits
2 Commits
3ddb13c14f
...
e07b8e69f8
Author | SHA256 | Date | |
---|---|---|---|
e07b8e69f8 | |||
2de42d2a83 |
BIN
138.0.7204.49-1.tar.gz
(Stored with Git LFS)
BIN
138.0.7204.49-1.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
138.0.7204.96-1.tar.gz
(Stored with Git LFS)
Normal file
BIN
138.0.7204.96-1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,10 +0,0 @@
|
||||
--- chromium-137.0.7151.15/chrome/browser/ui/safety_hub/disruptive_notification_permissions_manager.h 2025/05/12 22:24:56 1.1
|
||||
+++ chromium-137.0.7151.15/chrome/browser/ui/safety_hub/disruptive_notification_permissions_manager.h 2025/05/12 22:25:05
|
||||
@@ -6,6 +6,7 @@
|
||||
#define CHROME_BROWSER_UI_SAFETY_HUB_DISRUPTIVE_NOTIFICATION_PERMISSIONS_MANAGER_H_
|
||||
|
||||
#include <memory>
|
||||
+#include <set>
|
||||
|
||||
#include "base/scoped_observation.h"
|
||||
#include "base/time/clock.h"
|
BIN
chromium-138.0.7204.49.tar.xz
(Stored with Git LFS)
BIN
chromium-138.0.7204.49.tar.xz
(Stored with Git LFS)
Binary file not shown.
BIN
chromium-138.0.7204.96.tar.xz
(Stored with Git LFS)
Normal file
BIN
chromium-138.0.7204.96.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
16
chromium-91-java-only-allowed-in-android-builds.patch
Normal file
16
chromium-91-java-only-allowed-in-android-builds.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
References: https://bugs.chromium.org/p/chromium/issues/detail?id=1192875
|
||||
|
||||
Index: chromium-91.0.4472.57/third_party/closure_compiler/compiler.py
|
||||
===================================================================
|
||||
--- chromium-91.0.4472.57.orig/third_party/closure_compiler/compiler.py
|
||||
+++ chromium-91.0.4472.57/third_party/closure_compiler/compiler.py
|
||||
@@ -13,8 +13,7 @@ import subprocess
|
||||
|
||||
|
||||
_CURRENT_DIR = os.path.join(os.path.dirname(__file__))
|
||||
-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
|
||||
-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds"
|
||||
+_JAVA_PATH = "java"
|
||||
|
||||
class Compiler(object):
|
||||
"""Runs the Closure compiler on given source files to typecheck them
|
@@ -1,7 +1,7 @@
|
||||
Index: chromium-136.0.7103.48/third_party/skia/BUILD.gn
|
||||
Index: chromium-138.0.7204.35/third_party/skia/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/BUILD.gn
|
||||
+++ chromium-136.0.7103.48/third_party/skia/BUILD.gn
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/BUILD.gn
|
||||
+++ chromium-138.0.7204.35/third_party/skia/BUILD.gn
|
||||
@@ -193,6 +193,12 @@ opts("lasx") {
|
||||
cflags = [ "-mlasx" ]
|
||||
}
|
||||
@@ -15,7 +15,7 @@ Index: chromium-136.0.7103.48/third_party/skia/BUILD.gn
|
||||
# Any feature of Skia that requires third-party code should be optional and use this template.
|
||||
template("optional") {
|
||||
if (invoker.enabled) {
|
||||
@@ -1651,6 +1657,7 @@ skia_component("skia") {
|
||||
@@ -1661,6 +1667,7 @@ skia_component("skia") {
|
||||
":skx",
|
||||
":typeface_fontations",
|
||||
":vello",
|
||||
@@ -23,7 +23,7 @@ Index: chromium-136.0.7103.48/third_party/skia/BUILD.gn
|
||||
":webp_decode",
|
||||
":wuffs",
|
||||
":xml",
|
||||
@@ -1822,7 +1829,10 @@ skia_static_library("pathkit") {
|
||||
@@ -1832,7 +1839,10 @@ skia_static_library("pathkit") {
|
||||
public_configs = [ ":skia_public" ]
|
||||
configs = skia_library_configs
|
||||
|
||||
@@ -35,10 +35,10 @@ Index: chromium-136.0.7103.48/third_party/skia/BUILD.gn
|
||||
|
||||
sources = []
|
||||
sources += skia_pathops_sources
|
||||
Index: chromium-136.0.7103.48/third_party/skia/gn/skia/BUILD.gn
|
||||
Index: chromium-138.0.7204.35/third_party/skia/gn/skia/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/gn/skia/BUILD.gn
|
||||
+++ chromium-136.0.7103.48/third_party/skia/gn/skia/BUILD.gn
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/gn/skia/BUILD.gn
|
||||
+++ chromium-138.0.7204.35/third_party/skia/gn/skia/BUILD.gn
|
||||
@@ -175,6 +175,8 @@ config("default") {
|
||||
"-mfpmath=sse",
|
||||
]
|
||||
@@ -48,11 +48,11 @@ Index: chromium-136.0.7103.48/third_party/skia/gn/skia/BUILD.gn
|
||||
} else if (current_cpu == "loong64") {
|
||||
cflags += [
|
||||
"-mlsx",
|
||||
Index: chromium-136.0.7103.48/third_party/skia/include/core/SkTypes.h
|
||||
Index: chromium-138.0.7204.35/third_party/skia/include/core/SkTypes.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/include/core/SkTypes.h
|
||||
+++ chromium-136.0.7103.48/third_party/skia/include/core/SkTypes.h
|
||||
@@ -188,4 +188,43 @@ static constexpr uint32_t SK_InvalidGenI
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/include/core/SkTypes.h
|
||||
+++ chromium-138.0.7204.35/third_party/skia/include/core/SkTypes.h
|
||||
@@ -194,4 +194,43 @@ static constexpr uint32_t SK_InvalidGenI
|
||||
*/
|
||||
static constexpr uint32_t SK_InvalidUniqueID = 0;
|
||||
|
||||
@@ -96,10 +96,10 @@ Index: chromium-136.0.7103.48/third_party/skia/include/core/SkTypes.h
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/base/SkSpinlock.cpp
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/base/SkSpinlock.cpp
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/base/SkSpinlock.cpp
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/base/SkSpinlock.cpp
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/base/SkSpinlock.cpp
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/base/SkSpinlock.cpp
|
||||
@@ -33,7 +33,8 @@
|
||||
#endif
|
||||
|
||||
@@ -110,10 +110,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/base/SkSpinlock.cpp
|
||||
#include <emmintrin.h>
|
||||
static void do_pause() { _mm_pause(); }
|
||||
#else
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkBitmapProcState_opts.h
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkBitmapProcState_opts.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/opts/SkBitmapProcState_opts.h
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/opts/SkBitmapProcState_opts.h
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkBitmapProcState_opts.h
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkBitmapProcState_opts.h
|
||||
@@ -21,7 +21,13 @@
|
||||
// The rest are scattershot at the moment but I want to get them
|
||||
// all migrated to be normal code inside SkBitmapProcState.cpp.
|
||||
@@ -129,10 +129,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkBitmapProcState_opts.h
|
||||
#include <immintrin.h>
|
||||
#elif defined(SK_ARM_HAS_NEON)
|
||||
#include <arm_neon.h>
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkBlitRow_opts.h
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkBlitRow_opts.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/opts/SkBlitRow_opts.h
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/opts/SkBlitRow_opts.h
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkBlitRow_opts.h
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkBlitRow_opts.h
|
||||
@@ -69,7 +69,7 @@
|
||||
#endif
|
||||
|
||||
@@ -142,10 +142,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkBlitRow_opts.h
|
||||
|
||||
static inline __m128i SkPMSrcOver_SSE2(const __m128i& src, const __m128i& dst) {
|
||||
__m128i scale = _mm_sub_epi32(_mm_set1_epi32(256),
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2018 Google Inc.
|
||||
@@ -171,7 +171,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
#elif defined(SKRP_CPU_LASX)
|
||||
#include <lasxintrin.h>
|
||||
#include <lsxintrin.h>
|
||||
@@ -200,6 +205,184 @@ namespace SK_OPTS_NS {
|
||||
@@ -202,6 +207,192 @@ namespace SK_OPTS_NS {
|
||||
ptr[3] = a;
|
||||
}
|
||||
|
||||
@@ -238,6 +238,14 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
+ SI V<T> gather(const T* p, U32 ix) {
|
||||
+ return {p[ix[0]], p[ix[1]], p[ix[2]], p[ix[3]]};
|
||||
+ }
|
||||
+ template <typename T>
|
||||
+ SI V<T> gather_unaligned(const T* ptr, U32 ix) {
|
||||
+ // This tells the compiler ptr might not be aligned appropriately, so
|
||||
+ // it generates better assembly.
|
||||
+ typedef T __attribute__ ((aligned (1))) unaligned_ptr;
|
||||
+ const unaligned_ptr* uptr = static_cast<const unaligned_ptr*>(ptr);
|
||||
+ return V<T>{uptr[ix[0]], uptr[ix[1]], uptr[ix[2]], uptr[ix[3]]};
|
||||
+ }
|
||||
+ template <typename V, typename S>
|
||||
+ SI void scatter_masked(V src, S* dst, U32 ix, I32 mask) {
|
||||
+ V before = gather(dst, ix);
|
||||
@@ -356,7 +364,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
#elif defined(SKRP_CPU_NEON)
|
||||
template <typename T> using V = Vec<4, T>;
|
||||
using F = V<float >;
|
||||
@@ -1389,6 +1572,15 @@ SI F from_half(U16 h) {
|
||||
@@ -1427,6 +1618,15 @@ SI F from_half(U16 h) {
|
||||
#elif defined(SKRP_CPU_HSW)
|
||||
return _mm256_cvtph_ps((__m128i)h);
|
||||
|
||||
@@ -372,7 +380,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
#else
|
||||
// Remember, a half is 1-5-10 (sign-exponent-mantissa) with 15 exponent bias.
|
||||
U32 sem = expand(h),
|
||||
@@ -1412,6 +1604,16 @@ SI U16 to_half(F f) {
|
||||
@@ -1450,6 +1650,16 @@ SI U16 to_half(F f) {
|
||||
#elif defined(SKRP_CPU_HSW)
|
||||
return (U16)_mm256_cvtps_ph(f, _MM_FROUND_CUR_DIRECTION);
|
||||
|
||||
@@ -389,7 +397,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
#else
|
||||
// Remember, a float is 1-8-23 (sign-exponent-mantissa) with 127 exponent bias.
|
||||
U32 sem = sk_bit_cast<U32>(f),
|
||||
@@ -1492,7 +1694,7 @@ static constexpr size_t N = sizeof(F) /
|
||||
@@ -1530,7 +1740,7 @@ static constexpr size_t N = sizeof(F) /
|
||||
// instead of {b,a} on the stack. Narrow stages work best for __vectorcall.
|
||||
#define ABI __vectorcall
|
||||
#define SKRP_NARROW_STAGES 1
|
||||
@@ -398,7 +406,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
// These platforms are ideal for wider stages, and their default ABI is ideal.
|
||||
#define ABI
|
||||
#define SKRP_NARROW_STAGES 0
|
||||
@@ -5501,6 +5703,10 @@ SI F sqrt_(F x) {
|
||||
@@ -5539,6 +5749,10 @@ SI F sqrt_(F x) {
|
||||
float32x4_t lo,hi;
|
||||
split(x, &lo,&hi);
|
||||
return join<F>(sqrt(lo), sqrt(hi));
|
||||
@@ -409,7 +417,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
#elif defined(SKRP_CPU_LASX)
|
||||
__m256 lo,hi;
|
||||
split(x, &lo,&hi);
|
||||
@@ -5532,6 +5738,10 @@ SI F floor_(F x) {
|
||||
@@ -5570,6 +5784,10 @@ SI F floor_(F x) {
|
||||
__m128 lo,hi;
|
||||
split(x, &lo,&hi);
|
||||
return join<F>(_mm_floor_ps(lo), _mm_floor_ps(hi));
|
||||
@@ -420,7 +428,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
#elif defined(SKRP_CPU_LASX)
|
||||
__m256 lo,hi;
|
||||
split(x, &lo,&hi);
|
||||
@@ -5551,6 +5761,7 @@ SI F floor_(F x) {
|
||||
@@ -5589,6 +5807,7 @@ SI F floor_(F x) {
|
||||
// (2 * a * b + (1 << 15)) >> 16
|
||||
// The result is a number on [-1, 1).
|
||||
// Note: on neon this is a saturating multiply while the others are not.
|
||||
@@ -428,7 +436,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
SI I16 scaled_mult(I16 a, I16 b) {
|
||||
#if defined(SKRP_CPU_SKX)
|
||||
return (I16)_mm256_mulhrs_epi16((__m256i)a, (__m256i)b);
|
||||
@@ -5562,6 +5773,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
|
||||
@@ -5600,6 +5819,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
|
||||
return vqrdmulhq_s16(a, b);
|
||||
#elif defined(SKRP_CPU_NEON)
|
||||
return vqrdmulhq_s16(a, b);
|
||||
@@ -451,7 +459,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
#elif defined(SKRP_CPU_LASX)
|
||||
I16 res = __lasx_xvmuh_h(a, b);
|
||||
return __lasx_xvslli_h(res, 1);
|
||||
@@ -5589,7 +5816,26 @@ SI U16 constrained_add(I16 a, U16 b) {
|
||||
@@ -5627,7 +5862,26 @@ SI U16 constrained_add(I16 a, U16 b) {
|
||||
SkASSERT(-ib <= ia && ia <= 65535 - ib);
|
||||
}
|
||||
#endif
|
||||
@@ -478,7 +486,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
}
|
||||
|
||||
SI F fract(F x) { return x - floor_(x); }
|
||||
@@ -6606,8 +6852,14 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
|
||||
@@ -6683,8 +6937,14 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
|
||||
// 2^-8 * v = 2^-9 * (tx*(R - L) + (R + L))
|
||||
// v = 1/2 * (tx*(R - L) + (R + L))
|
||||
auto lerpX = [&](U16 left, U16 right) -> U16 {
|
||||
@@ -493,7 +501,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
// The constrained_add is the most subtle part of lerp. The first term is on the interval
|
||||
// [-1, 1), and the second term is on the interval is on the interval [0, 1) because
|
||||
// both terms are too high by a factor of 2 which will be handled below. (Both R and L are
|
||||
@@ -6619,7 +6871,12 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
|
||||
@@ -6696,7 +6956,12 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
|
||||
U16 v2 = constrained_add(scaled_mult(tx, width), middle) + 1;
|
||||
// Divide by 2 to calculate v and at the same time bring the intermediate value onto the
|
||||
// interval [0, 1/2] to set up for the lerpY.
|
||||
@@ -506,7 +514,7 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
};
|
||||
|
||||
const uint32_t* ptr;
|
||||
@@ -6653,9 +6910,15 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
|
||||
@@ -6730,9 +6995,15 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
|
||||
I16 width = (I16)bottom - (I16)top;
|
||||
U16 middle = bottom + top;
|
||||
// Add + 0x80 for rounding.
|
||||
@@ -523,10 +531,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
};
|
||||
|
||||
r = lerpY(topR, bottomR);
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/base/SkVx.h
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/base/SkVx.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/base/SkVx.h
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/base/SkVx.h
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/base/SkVx.h
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/base/SkVx.h
|
||||
@@ -41,7 +41,12 @@
|
||||
#endif
|
||||
|
||||
@@ -541,10 +549,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/base/SkVx.h
|
||||
#include <immintrin.h>
|
||||
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41
|
||||
#include <smmintrin.h>
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "src/core/SkBlitMask.h"
|
||||
#include "src/core/SkOptsTargets.h"
|
||||
@@ -554,10 +562,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBlitMask_opts_ssse3.cp
|
||||
|
||||
// The order of these includes is important:
|
||||
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "src/core/SkOptsTargets.h"
|
||||
#include "src/core/SkSwizzlePriv.h"
|
||||
@@ -567,10 +575,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/core/SkSwizzler_opts_ssse3.cp
|
||||
!defined(SK_ENABLE_OPTIMIZE_SIZE) && \
|
||||
SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
|
||||
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBlitMask_opts.cpp
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts.cpp
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/core/SkBlitMask_opts.cpp
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/core/SkBlitMask_opts.cpp
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBlitMask_opts.cpp
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts.cpp
|
||||
@@ -25,7 +25,7 @@ namespace SkOpts {
|
||||
static bool init() {
|
||||
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
|
||||
@@ -580,10 +588,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBlitMask_opts.cpp
|
||||
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
|
||||
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BlitMask_ssse3(); }
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBitmapProcState_opts.cpp
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts.cpp
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/core/SkBitmapProcState_opts.cpp
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/core/SkBitmapProcState_opts.cpp
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBitmapProcState_opts.cpp
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts.cpp
|
||||
@@ -27,7 +27,7 @@ namespace SkOpts {
|
||||
static bool init() {
|
||||
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
|
||||
@@ -593,10 +601,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBitmapProcState_opts.c
|
||||
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
|
||||
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BitmapProcState_ssse3(); }
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/core/SkCpu.h
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkCpu.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/core/SkCpu.h
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/core/SkCpu.h
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkCpu.h
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkCpu.h
|
||||
@@ -60,7 +60,7 @@ inline bool SkCpu::Supports(uint32_t mas
|
||||
|
||||
// If we mask in compile-time known lower limits, the compiler can
|
||||
@@ -606,10 +614,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/core/SkCpu.h
|
||||
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
|
||||
features |= SSE1;
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "include/private/base/SkFeatures.h"
|
||||
#include "src/core/SkOptsTargets.h"
|
||||
@@ -619,10 +627,10 @@ Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBitmapProcState_opts_s
|
||||
|
||||
// The order of these includes is important:
|
||||
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
|
||||
Index: chromium-136.0.7103.48/third_party/skia/include/private/base/SkFeatures.h
|
||||
Index: chromium-138.0.7204.35/third_party/skia/include/private/base/SkFeatures.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/include/private/base/SkFeatures.h
|
||||
+++ chromium-136.0.7103.48/third_party/skia/include/private/base/SkFeatures.h
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/include/private/base/SkFeatures.h
|
||||
+++ chromium-138.0.7204.35/third_party/skia/include/private/base/SkFeatures.h
|
||||
@@ -63,6 +63,8 @@
|
||||
|
||||
#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
|
||||
@@ -632,10 +640,10 @@ Index: chromium-136.0.7103.48/third_party/skia/include/private/base/SkFeatures.h
|
||||
#endif
|
||||
|
||||
#if defined(__loongarch__) || defined (__loongarch64)
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkSwizzler_opts.inc
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkSwizzler_opts.inc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/opts/SkSwizzler_opts.inc
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/opts/SkSwizzler_opts.inc
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkSwizzler_opts.inc
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkSwizzler_opts.inc
|
||||
@@ -14,7 +14,10 @@
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
@@ -682,11 +690,11 @@ Index: chromium-136.0.7103.48/third_party/skia/src/opts/SkSwizzler_opts.inc
|
||||
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 && (defined(__clang__) || !defined(_MSC_VER))
|
||||
// -- SSE -- Harden against timing attacks -- MSVC is not supported.
|
||||
using F4 = __m128;
|
||||
Index: chromium-136.0.7103.48/third_party/skia/src/core/SkBlitter_ARGB32.cpp
|
||||
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitter_ARGB32.cpp
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/skia/src/core/SkBlitter_ARGB32.cpp
|
||||
+++ chromium-136.0.7103.48/third_party/skia/src/core/SkBlitter_ARGB32.cpp
|
||||
@@ -127,6 +127,16 @@ static inline SkPMColor blend_lcd16_opaq
|
||||
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBlitter_ARGB32.cpp
|
||||
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBlitter_ARGB32.cpp
|
||||
@@ -129,6 +129,16 @@ static inline SkPMColor blend_lcd16_opaq
|
||||
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
|
||||
#include <emmintrin.h>
|
||||
|
||||
|
@@ -1,24 +0,0 @@
|
||||
From bb255dd0252e256a28542475b22711346c319030 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Simmons <jsimmons@google.com>
|
||||
Date: Fri, 16 May 2025 01:08:27 +0000
|
||||
Subject: [PATCH] Fix shift of the blue component in store_1010102_xr
|
||||
|
||||
Bug: https://github.com/flutter/flutter/issues/168849
|
||||
Change-Id: I43c21535fbea6749f644301e162aacb2bbd5f5c3
|
||||
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/994956
|
||||
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
|
||||
Commit-Queue: Jason Simmons <jsimmons@google.com>
|
||||
|
||||
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h
|
||||
index fb644ba5e3..3784ccbde5 100644
|
||||
--- a/src/opts/SkRasterPipeline_opts.h
|
||||
+++ b/src/opts/SkRasterPipeline_opts.h
|
||||
@@ -3137,7 +3137,7 @@ HIGHP_STAGE(store_1010102_xr, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
// This is the inverse of from_1010102_xr, e.g. (v * 510 + 384)
|
||||
U32 px = to_unorm(r, /*scale=*/510, /*bias=*/384, /*maxI=*/1023)
|
||||
| to_unorm(g, /*scale=*/510, /*bias=*/384, /*maxI=*/1023) << 10
|
||||
- | to_unorm(b, /*scale=*/510, /*bias=*/384, /*maxI=*/1023) << 10
|
||||
+ | to_unorm(b, /*scale=*/510, /*bias=*/384, /*maxI=*/1023) << 20
|
||||
| to_unorm(a, /*scale=*/3) << 30;
|
||||
store(ptr, px);
|
||||
}
|
@@ -1,272 +0,0 @@
|
||||
From c759c1a4717afadfedab300b6314f428b05741ac Mon Sep 17 00:00:00 2001
|
||||
From: Kaylee Lubick <kjlubick@google.com>
|
||||
Date: Mon, 21 Apr 2025 14:51:16 -0400
|
||||
Subject: [PATCH] Remove alignment assumptions in highp gather
|
||||
|
||||
Follow-up to http://review.skia.org/981638
|
||||
|
||||
We didn't have any reports that this was causing a problem
|
||||
but I didn't want to leave the same root cause lurking.
|
||||
|
||||
Change-Id: I0d42c4abf4d642f5a33e094f88bde7bf387d2f2f
|
||||
Bug: b/409859319
|
||||
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/983176
|
||||
Reviewed-by: Daniel Dilan <danieldilan@google.com>
|
||||
|
||||
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h
|
||||
index d14df3677c..fb644ba5e3 100644
|
||||
--- a/src/opts/SkRasterPipeline_opts.h
|
||||
+++ b/src/opts/SkRasterPipeline_opts.h
|
||||
@@ -161,6 +161,8 @@ namespace SK_OPTS_NS {
|
||||
|
||||
template <typename T>
|
||||
SI T gather(const T* p, U32 ix) { return p[ix]; }
|
||||
+ template <typename T>
|
||||
+ SI T gather_unaligned(const T* p, U32 ix) { return gather<T>(p, ix); }
|
||||
|
||||
SI void scatter_masked(I32 src, int* dst, U32 ix, I32 mask) {
|
||||
dst[ix] = mask ? src : dst[ix];
|
||||
@@ -274,9 +276,23 @@ namespace SK_OPTS_NS {
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
- SI V<T> gather(const T* p, U32 ix) {
|
||||
- return V<T>{p[ix[0]], p[ix[1]], p[ix[2]], p[ix[3]]};
|
||||
+ SI V<T> gather(const T* ptr, U32 ix) {
|
||||
+ // The compiler assumes ptr is aligned, which caused crashes on some
|
||||
+ // arm32 chips because a register was marked as "aligned to 32 bits"
|
||||
+ // incorrectly. https://crbug.com/skia/409859319
|
||||
+ SkASSERTF(reinterpret_cast<uintptr_t>(ptr) % alignof(T) == 0,
|
||||
+ "Should use gather_unaligned");
|
||||
+ return V<T>{ptr[ix[0]], ptr[ix[1]], ptr[ix[2]], ptr[ix[3]]};
|
||||
+ }
|
||||
+ template <typename T>
|
||||
+ SI V<T> gather_unaligned(const T* ptr, U32 ix) {
|
||||
+ // This tells the compiler ptr might not be aligned appropriately, so
|
||||
+ // it generates better assembly.
|
||||
+ typedef T __attribute__ ((aligned (1))) unaligned_ptr;
|
||||
+ const unaligned_ptr* uptr = static_cast<const unaligned_ptr*>(ptr);
|
||||
+ return V<T>{uptr[ix[0]], uptr[ix[1]], uptr[ix[2]], uptr[ix[3]]};
|
||||
}
|
||||
+
|
||||
SI void scatter_masked(I32 src, int* dst, U32 ix, I32 mask) {
|
||||
I32 before = gather(dst, ix);
|
||||
I32 after = if_then_else(mask, src, before);
|
||||
@@ -389,6 +405,11 @@ namespace SK_OPTS_NS {
|
||||
};
|
||||
return sk_bit_cast<U64>(parts);
|
||||
}
|
||||
+ template <typename T>
|
||||
+ SI V<T> gather_unaligned(const T* p, U32 ix) {
|
||||
+ return gather(p, ix);
|
||||
+ }
|
||||
+
|
||||
template <typename V, typename S>
|
||||
SI void scatter_masked(V src, S* dst, U32 ix, I32 mask) {
|
||||
V before = gather(dst, ix);
|
||||
@@ -627,6 +648,11 @@ namespace SK_OPTS_NS {
|
||||
};
|
||||
return sk_bit_cast<U64>(parts);
|
||||
}
|
||||
+ template <typename T>
|
||||
+ SI V<T> gather_unaligned(const T* p, U32 ix) {
|
||||
+ return gather(p, ix);
|
||||
+ }
|
||||
+
|
||||
SI void scatter_masked(I32 src, int* dst, U32 ix, I32 mask) {
|
||||
I32 before = gather(dst, ix);
|
||||
I32 after = if_then_else(mask, src, before);
|
||||
@@ -827,6 +853,10 @@ namespace SK_OPTS_NS {
|
||||
SI V<T> gather(const T* p, U32 ix) {
|
||||
return V<T>{p[ix[0]], p[ix[1]], p[ix[2]], p[ix[3]]};
|
||||
}
|
||||
+ template <typename T>
|
||||
+ SI V<T> gather_unaligned(const T* p, U32 ix) {
|
||||
+ return gather(p, ix);
|
||||
+ }
|
||||
SI void scatter_masked(I32 src, int* dst, U32 ix, I32 mask) {
|
||||
I32 before = gather(dst, ix);
|
||||
I32 after = if_then_else(mask, src, before);
|
||||
@@ -988,6 +1018,10 @@ namespace SK_OPTS_NS {
|
||||
return V<T>{ p[ix[0]], p[ix[1]], p[ix[2]], p[ix[3]],
|
||||
p[ix[4]], p[ix[5]], p[ix[6]], p[ix[7]], };
|
||||
}
|
||||
+ template <typename T>
|
||||
+ SI V<T> gather_unaligned(const T* p, U32 ix) {
|
||||
+ return gather(p, ix);
|
||||
+ }
|
||||
|
||||
template <typename V, typename S>
|
||||
SI void scatter_masked(V src, S* dst, U32 ix, I32 mask) {
|
||||
@@ -1195,6 +1229,10 @@ namespace SK_OPTS_NS {
|
||||
ret = (F)__lsx_vinsgr2vr_w(ret, p[ix3], 3);
|
||||
return ret;
|
||||
}
|
||||
+ template <typename T>
|
||||
+ SI V<T> gather_unaligned(const T* p, U32 ix) {
|
||||
+ return gather(p, ix);
|
||||
+ }
|
||||
|
||||
template <typename V, typename S>
|
||||
SI void scatter_masked(V src, S* dst, U32 ix, I32 mask) {
|
||||
@@ -2854,7 +2892,7 @@ HIGHP_STAGE(load_565_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_565, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r,g);
|
||||
- from_565(gather(ptr, ix), &r,&g,&b);
|
||||
+ from_565(gather_unaligned(ptr, ix), &r,&g,&b);
|
||||
a = F1;
|
||||
}
|
||||
HIGHP_STAGE(store_565, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
@@ -2877,7 +2915,7 @@ HIGHP_STAGE(load_4444_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_4444, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r,g);
|
||||
- from_4444(gather(ptr, ix), &r,&g,&b,&a);
|
||||
+ from_4444(gather_unaligned(ptr, ix), &r,&g,&b,&a);
|
||||
}
|
||||
HIGHP_STAGE(store_4444, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<uint16_t>(ctx, dx,dy);
|
||||
@@ -2899,7 +2937,7 @@ HIGHP_STAGE(load_8888_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_8888, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint32_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r,g);
|
||||
- from_8888(gather(ptr, ix), &r,&g,&b,&a);
|
||||
+ from_8888(gather_unaligned(ptr, ix), &r,&g,&b,&a);
|
||||
}
|
||||
HIGHP_STAGE(store_8888, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<uint32_t>(ctx, dx,dy);
|
||||
@@ -2926,7 +2964,7 @@ HIGHP_STAGE(load_rg88_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_rg88, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
- from_88(gather(ptr, ix), &r, &g);
|
||||
+ from_88(gather_unaligned(ptr, ix), &r, &g);
|
||||
b = F0;
|
||||
a = F1;
|
||||
}
|
||||
@@ -2950,7 +2988,7 @@ HIGHP_STAGE(gather_a16, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
r = g = b = F0;
|
||||
- a = from_short(gather(ptr, ix));
|
||||
+ a = from_short(gather_unaligned(ptr, ix));
|
||||
}
|
||||
HIGHP_STAGE(store_a16, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<uint16_t>(ctx, dx,dy);
|
||||
@@ -2974,7 +3012,7 @@ HIGHP_STAGE(load_rg1616_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_rg1616, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint32_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
- from_1616(gather(ptr, ix), &r, &g);
|
||||
+ from_1616(gather_unaligned(ptr, ix), &r, &g);
|
||||
b = F0;
|
||||
a = F1;
|
||||
}
|
||||
@@ -2997,7 +3035,7 @@ HIGHP_STAGE(load_16161616_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_16161616, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint64_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
- from_16161616(gather(ptr, ix), &r, &g, &b, &a);
|
||||
+ from_16161616(gather_unaligned(ptr, ix), &r, &g, &b, &a);
|
||||
}
|
||||
HIGHP_STAGE(store_16161616, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<uint16_t>(ctx, 4*dx,4*dy);
|
||||
@@ -3021,7 +3059,7 @@ HIGHP_STAGE(load_10x6_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_10x6, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint64_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
- from_10x6(gather(ptr, ix), &r, &g, &b, &a);
|
||||
+ from_10x6(gather_unaligned(ptr, ix), &r, &g, &b, &a);
|
||||
}
|
||||
HIGHP_STAGE(store_10x6, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<uint16_t>(ctx, 4*dx,4*dy);
|
||||
@@ -3053,17 +3091,17 @@ HIGHP_STAGE(load_1010102_xr_dst, const SkRasterPipelineContexts::MemoryCtx* ctx)
|
||||
HIGHP_STAGE(gather_1010102, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint32_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r,g);
|
||||
- from_1010102(gather(ptr, ix), &r,&g,&b,&a);
|
||||
+ from_1010102(gather_unaligned(ptr, ix), &r,&g,&b,&a);
|
||||
}
|
||||
HIGHP_STAGE(gather_1010102_xr, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint32_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
- from_1010102_xr(gather(ptr, ix), &r,&g,&b,&a);
|
||||
+ from_1010102_xr(gather_unaligned(ptr, ix), &r,&g,&b,&a);
|
||||
}
|
||||
HIGHP_STAGE(gather_10101010_xr, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint64_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
- from_10101010_xr(gather(ptr, ix), &r, &g, &b, &a);
|
||||
+ from_10101010_xr(gather_unaligned(ptr, ix), &r, &g, &b, &a);
|
||||
}
|
||||
HIGHP_STAGE(load_10101010_xr, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<const uint64_t>(ctx, dx, dy);
|
||||
@@ -3127,7 +3165,7 @@ HIGHP_STAGE(load_f16_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_f16, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint64_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r,g);
|
||||
- auto px = gather(ptr, ix);
|
||||
+ auto px = gather_unaligned(ptr, ix);
|
||||
|
||||
U16 R,G,B,A;
|
||||
load4((const uint16_t*)&px, &R,&G,&B,&A);
|
||||
@@ -3164,7 +3202,7 @@ HIGHP_STAGE(gather_af16, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
r = g = b = F0;
|
||||
- a = from_half(gather(ptr, ix));
|
||||
+ a = from_half(gather_unaligned(ptr, ix));
|
||||
}
|
||||
HIGHP_STAGE(store_af16, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<uint16_t>(ctx, dx,dy);
|
||||
@@ -3194,7 +3232,7 @@ HIGHP_STAGE(load_rgf16_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_rgf16, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint32_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r, g);
|
||||
- auto px = gather(ptr, ix);
|
||||
+ auto px = gather_unaligned(ptr, ix);
|
||||
|
||||
U16 R,G;
|
||||
load2((const uint16_t*)&px, &R, &G);
|
||||
@@ -3220,10 +3258,10 @@ HIGHP_STAGE(load_f32_dst, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
HIGHP_STAGE(gather_f32, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const float* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, r,g);
|
||||
- r = gather(ptr, 4*ix + 0);
|
||||
- g = gather(ptr, 4*ix + 1);
|
||||
- b = gather(ptr, 4*ix + 2);
|
||||
- a = gather(ptr, 4*ix + 3);
|
||||
+ r = gather_unaligned(ptr, 4*ix + 0);
|
||||
+ g = gather_unaligned(ptr, 4*ix + 1);
|
||||
+ b = gather_unaligned(ptr, 4*ix + 2);
|
||||
+ a = gather_unaligned(ptr, 4*ix + 3);
|
||||
}
|
||||
HIGHP_STAGE(store_f32, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
auto ptr = ptr_at_xy<float>(ctx, 4*dx,4*dy);
|
||||
@@ -5009,7 +5047,7 @@ HIGHP_STAGE(bilerp_clamp_8888, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, x,y);
|
||||
|
||||
F sr,sg,sb,sa;
|
||||
- from_8888(gather(ptr, ix), &sr,&sg,&sb,&sa);
|
||||
+ from_8888(gather_unaligned(ptr, ix), &sr,&sg,&sb,&sa);
|
||||
|
||||
// In bilinear interpolation, the 4 pixels at +/- 0.5 offsets from the sample pixel center
|
||||
// are combined in direct proportion to their area overlapping that logical query pixel.
|
||||
@@ -5061,7 +5099,7 @@ HIGHP_STAGE(bicubic_clamp_8888, const SkRasterPipelineContexts::GatherCtx* ctx)
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, sample_x, sample_y);
|
||||
|
||||
F sr,sg,sb,sa;
|
||||
- from_8888(gather(ptr, ix), &sr,&sg,&sb,&sa);
|
||||
+ from_8888(gather_unaligned(ptr, ix), &sr,&sg,&sb,&sa);
|
||||
|
||||
r = mad(scale, sr, r);
|
||||
g = mad(scale, sg, g);
|
||||
@@ -5959,7 +5997,6 @@ SI void store(T* ptr, V v) {
|
||||
}
|
||||
#endif
|
||||
|
||||
-
|
||||
// ~~~~~~ 32-bit memory loads and stores ~~~~~~ //
|
||||
|
||||
SI void from_8888(U32 rgba, U16* r, U16* g, U16* b, U16* a) {
|
@@ -1,179 +0,0 @@
|
||||
From 68e53210b76cadb14e98aaea58e30388f94bc9a1 Mon Sep 17 00:00:00 2001
|
||||
From: Kaylee Lubick <kjlubick@google.com>
|
||||
Date: Mon, 21 Apr 2025 14:19:04 -0400
|
||||
Subject: [PATCH] Avoid assumption of 32 bit aligned pixel data in RP's lowp
|
||||
gather()
|
||||
|
||||
The attached bug has most of the context, but the problem boils down
|
||||
to the compiler assuming that a uint32_t* was aligned to 32 bits
|
||||
and generated instructions like:
|
||||
vld1.32 {d16[0]}, [r4:32]
|
||||
where the :32 means "aligned to 32 bits" [1]. Pixel data is usually
|
||||
aligned to the so-called natural alignment (pointer size) because
|
||||
we allocate it with `new` or `calloc`. However, if we were to call
|
||||
drawRect and use a source starting at x = 1, this eventually leads
|
||||
to SkBitmap::extractSubset creating a SkPixelRef that starts at
|
||||
the original pixel* + 1 (which is now no longer evenly divisible
|
||||
by 4).
|
||||
|
||||
Certain ARM devices were crashing on this generated assembly. Rather
|
||||
than trying to write the assembly code by hand or use intrinsics,
|
||||
we can tell GCC and Clang that the pointer might be unaligned and
|
||||
then the generated instructions lack the :32 modifier (and make these
|
||||
devices not crash anymore):
|
||||
vld1.32 {d16[0]}, [r4]
|
||||
|
||||
This fix is in our low precision pipeline code but may also be needed
|
||||
in our high precision code too (which uses similar code). I wanted
|
||||
to be careful with this change because it's pretty critical to
|
||||
performance, so I kept the aligned version for cases where we know
|
||||
the data is aligned (e.g. reading factors and biases for our gradient
|
||||
stages).
|
||||
|
||||
This solution was inspired by Open CV
|
||||
https://github.com/opencv/opencv/issues/25265
|
||||
|
||||
[1] https://developer.arm.com/documentation/ddi0597/2025-03/SIMD-FP-Instructions/VLD1--multiple-single-elements---Load-multiple-single-1-element-structures-to-one--two--three--or-four-registers-
|
||||
|
||||
Change-Id: I2892740acbb9db7434aab897e11fa41c3548a196
|
||||
Bug: b/409859319
|
||||
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/981638
|
||||
Commit-Queue: Kaylee Lubick <kjlubick@google.com>
|
||||
Commit-Queue: Daniel Dilan <danieldilan@google.com>
|
||||
Auto-Submit: Kaylee Lubick <kjlubick@google.com>
|
||||
Reviewed-by: Daniel Dilan <danieldilan@google.com>
|
||||
|
||||
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h
|
||||
index 9573b84baf..d14df3677c 100644
|
||||
--- a/src/opts/SkRasterPipeline_opts.h
|
||||
+++ b/src/opts/SkRasterPipeline_opts.h
|
||||
@@ -5877,6 +5877,10 @@ SI void store(T* ptr, V v) {
|
||||
return (U32)_mm512_i32gather_epi32((__m512i)ix, ptr, 4);
|
||||
}
|
||||
|
||||
+ template <typename V, typename T>
|
||||
+ SI V gather_unaligned(const T* ptr, U32 ix) {
|
||||
+ return gather<V, T>(ptr, ix);
|
||||
+ }
|
||||
#elif defined(SKRP_CPU_HSW)
|
||||
template <typename V, typename T>
|
||||
SI V gather(const T* ptr, U32 ix) {
|
||||
@@ -5903,6 +5907,11 @@ SI void store(T* ptr, V v) {
|
||||
return join<U32>(_mm256_i32gather_epi32((const int*)ptr, lo, 4),
|
||||
_mm256_i32gather_epi32((const int*)ptr, hi, 4));
|
||||
}
|
||||
+
|
||||
+ template <typename V, typename T>
|
||||
+ SI V gather_unaligned(const T* ptr, U32 ix) {
|
||||
+ return gather<V, T>(ptr, ix);
|
||||
+ }
|
||||
#elif defined(SKRP_CPU_LASX)
|
||||
template <typename V, typename T>
|
||||
SI V gather(const T* ptr, U32 ix) {
|
||||
@@ -5911,12 +5920,43 @@ SI void store(T* ptr, V v) {
|
||||
ptr[ix[ 8]], ptr[ix[ 9]], ptr[ix[10]], ptr[ix[11]],
|
||||
ptr[ix[12]], ptr[ix[13]], ptr[ix[14]], ptr[ix[15]], };
|
||||
}
|
||||
+
|
||||
+ template <typename V, typename T>
|
||||
+ SI V gather_unaligned(const T* ptr, U32 ix) {
|
||||
+ return gather<V, T>(ptr, ix);
|
||||
+ }
|
||||
+#elif defined(SKRP_CPU_NEON)
|
||||
+ template <typename V, typename T>
|
||||
+ SI V gather(const T* ptr, U32 ix) {
|
||||
+ // The compiler assumes ptr is aligned, which caused crashes on some
|
||||
+ // arm32 chips because a register was marked as "aligned to 32 bits"
|
||||
+ // incorrectly. https://crbug.com/skia/409859319
|
||||
+ SkASSERTF(reinterpret_cast<uintptr_t>(ptr) % alignof(T) == 0,
|
||||
+ "Should use gather_unaligned");
|
||||
+ return V{ ptr[ix[ 0]], ptr[ix[ 1]], ptr[ix[ 2]], ptr[ix[ 3]],
|
||||
+ ptr[ix[ 4]], ptr[ix[ 5]], ptr[ix[ 6]], ptr[ix[ 7]], };
|
||||
+ }
|
||||
+
|
||||
+ template <typename V, typename T>
|
||||
+ SI V gather_unaligned(const T* ptr, U32 ix) {
|
||||
+ // This tells the compiler ptr might not be aligned appropriately, so
|
||||
+ // it generates better assembly.
|
||||
+ typedef T __attribute__ ((aligned (1))) unaligned_ptr;
|
||||
+ const unaligned_ptr* uptr = static_cast<const unaligned_ptr*>(ptr);
|
||||
+ return V{ uptr[ix[ 0]], uptr[ix[ 1]], uptr[ix[ 2]], uptr[ix[ 3]],
|
||||
+ uptr[ix[ 4]], uptr[ix[ 5]], uptr[ix[ 6]], uptr[ix[ 7]], };
|
||||
+ }
|
||||
#else
|
||||
template <typename V, typename T>
|
||||
SI V gather(const T* ptr, U32 ix) {
|
||||
return V{ ptr[ix[ 0]], ptr[ix[ 1]], ptr[ix[ 2]], ptr[ix[ 3]],
|
||||
ptr[ix[ 4]], ptr[ix[ 5]], ptr[ix[ 6]], ptr[ix[ 7]], };
|
||||
}
|
||||
+
|
||||
+ template <typename V, typename T>
|
||||
+ SI V gather_unaligned(const T* ptr, U32 ix) {
|
||||
+ return gather<V, T>(ptr, ix);
|
||||
+ }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6049,7 +6089,7 @@ LOWP_STAGE_PP(store_8888, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
LOWP_STAGE_GP(gather_8888, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint32_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, x,y);
|
||||
- from_8888(gather<U32>(ptr, ix), &r, &g, &b, &a);
|
||||
+ from_8888(gather_unaligned<U32>(ptr, ix), &r, &g, &b, &a);
|
||||
}
|
||||
|
||||
// ~~~~~~ 16-bit memory loads and stores ~~~~~~ //
|
||||
@@ -6099,7 +6139,7 @@ LOWP_STAGE_PP(store_565, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
LOWP_STAGE_GP(gather_565, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, x,y);
|
||||
- from_565(gather<U16>(ptr, ix), &r, &g, &b);
|
||||
+ from_565(gather_unaligned<U16>(ptr, ix), &r, &g, &b);
|
||||
a = U16_255;
|
||||
}
|
||||
|
||||
@@ -6149,7 +6189,7 @@ LOWP_STAGE_PP(store_4444, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
LOWP_STAGE_GP(gather_4444, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, x,y);
|
||||
- from_4444(gather<U16>(ptr, ix), &r,&g,&b,&a);
|
||||
+ from_4444(gather_unaligned<U16>(ptr, ix), &r,&g,&b,&a);
|
||||
}
|
||||
|
||||
SI void from_88(U16 rg, U16* r, U16* g) {
|
||||
@@ -6198,7 +6238,7 @@ LOWP_STAGE_PP(store_rg88, const SkRasterPipelineContexts::MemoryCtx* ctx) {
|
||||
LOWP_STAGE_GP(gather_rg88, const SkRasterPipelineContexts::GatherCtx* ctx) {
|
||||
const uint16_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, x, y);
|
||||
- from_88(gather<U16>(ptr, ix), &r, &g);
|
||||
+ from_88(gather_unaligned<U16>(ptr, ix), &r, &g);
|
||||
b = U16_0;
|
||||
a = U16_255;
|
||||
}
|
||||
@@ -6625,11 +6665,11 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const SkRasterPipelineContexts::GatherCtx* ctx)
|
||||
const uint32_t* ptr;
|
||||
U32 ix = ix_and_ptr(&ptr, ctx, sx, sy);
|
||||
U16 leftR, leftG, leftB, leftA;
|
||||
- from_8888(gather<U32>(ptr, ix), &leftR,&leftG,&leftB,&leftA);
|
||||
+ from_8888(gather_unaligned<U32>(ptr, ix), &leftR,&leftG,&leftB,&leftA);
|
||||
|
||||
ix = ix_and_ptr(&ptr, ctx, sx+1, sy);
|
||||
U16 rightR, rightG, rightB, rightA;
|
||||
- from_8888(gather<U32>(ptr, ix), &rightR,&rightG,&rightB,&rightA);
|
||||
+ from_8888(gather_unaligned<U32>(ptr, ix), &rightR,&rightG,&rightB,&rightA);
|
||||
|
||||
U16 topR = lerpX(leftR, rightR),
|
||||
topG = lerpX(leftG, rightG),
|
||||
@@ -6637,10 +6677,10 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const SkRasterPipelineContexts::GatherCtx* ctx)
|
||||
topA = lerpX(leftA, rightA);
|
||||
|
||||
ix = ix_and_ptr(&ptr, ctx, sx, sy+1);
|
||||
- from_8888(gather<U32>(ptr, ix), &leftR,&leftG,&leftB,&leftA);
|
||||
+ from_8888(gather_unaligned<U32>(ptr, ix), &leftR,&leftG,&leftB,&leftA);
|
||||
|
||||
ix = ix_and_ptr(&ptr, ctx, sx+1, sy+1);
|
||||
- from_8888(gather<U32>(ptr, ix), &rightR,&rightG,&rightB,&rightA);
|
||||
+ from_8888(gather_unaligned<U32>(ptr, ix), &rightR,&rightG,&rightB,&rightA);
|
||||
|
||||
U16 bottomR = lerpX(leftR, rightR),
|
||||
bottomG = lerpX(leftG, rightG),
|
@@ -1,14 +0,0 @@
|
||||
--- chromium-133.0.6943.98/chrome/browser/download/BUILD.gn 2025/02/25 16:06:29 1.1
|
||||
+++ chromium-133.0.6943.98/chrome/browser/download/BUILD.gn 2025/02/25 16:06:43
|
||||
@@ -24,9 +24,9 @@
|
||||
"//url",
|
||||
]
|
||||
|
||||
- if (safe_browsing_mode != 0) {
|
||||
+# if (safe_browsing_mode != 0) {
|
||||
public_deps += [ "//components/safe_browsing/content/common/proto:download_file_types_proto" ]
|
||||
- }
|
||||
+# }
|
||||
|
||||
if (!is_android) {
|
||||
sources += [ "download_commands.h" ]
|
@@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 1 12:18:23 CEST 2025 - ro@suse.de
|
||||
|
||||
- update from debian:
|
||||
ppc-fedora-skia-vsx-instructions.patch
|
||||
- dropped patches:
|
||||
ppc-skia-revert-1.patch
|
||||
ppc-skia-revert-2.patch
|
||||
ppc-skia-revert-3.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 1 10:43:12 CEST 2025 - ro@suse.de
|
||||
|
||||
- Chromium 138.0.7204.96
|
||||
(stable released 2025-06-30) (boo#1245544)
|
||||
* CVE-2025-6554: Type Confusion in V8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 26 22:53:20 CEST 2025 - ro@suse.de
|
||||
|
||||
@@ -393,6 +410,8 @@ Fri Jan 31 11:28:27 CET 2025 - ro@suse.de
|
||||
- use llvm19 also on 15.6/SLE-15-SP6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 30 18:08:11 CET 2025 - ro@suse.de
|
||||
|
||||
- Chromium 133.0.6943.35
|
||||
(beta released 2025-01-29)
|
||||
- use llvm19 also on 15.6/SLE-15-SP6
|
||||
|
@@ -102,7 +102,7 @@
|
||||
%endif
|
||||
# Package names
|
||||
Name: ungoogled-chromium
|
||||
Version: 138.0.7204.49
|
||||
Version: 138.0.7204.96
|
||||
Release: 0
|
||||
Summary: Google's open source browser project
|
||||
License: BSD-3-Clause AND LGPL-2.1-or-later
|
||||
@@ -133,6 +133,7 @@ Patch7: chromium-norar.patch
|
||||
Patch9: system-libdrm.patch
|
||||
# gentoo/fedora/arch patchset
|
||||
Patch15: chromium-125-compiler.patch
|
||||
Patch40: chromium-91-java-only-allowed-in-android-builds.patch
|
||||
Patch62: chromium-93-ffmpeg-4.4.patch
|
||||
Patch98: chromium-102-regex_pattern-array.patch
|
||||
# PATCH-FIX-SUSE: allow prop codecs to be set with chromium branding
|
||||
@@ -227,9 +228,6 @@ Patch1030: chromium-134-revert-rust-adler2.patch
|
||||
Patch1040: gtk-414.patch
|
||||
# clang is too old
|
||||
Patch1050: chromium-warning-suppression-mappings.patch
|
||||
#Patch1061: ppc-skia-revert-1.patch
|
||||
Patch1062: ppc-skia-revert-2.patch
|
||||
Patch1063: ppc-skia-revert-3.patch
|
||||
# end conditionally applied patches
|
||||
BuildRequires: SDL-devel
|
||||
BuildRequires: bison
|
||||
@@ -529,13 +527,6 @@ if [ "$clang_version" -lt 20 ] ; then
|
||||
%patch -p1 -R -P 1050
|
||||
fi
|
||||
|
||||
%ifarch ppc64le
|
||||
pushd third_party/skia
|
||||
%patch -p1 -R -P 1062
|
||||
%patch -p1 -R -P 1063
|
||||
popd
|
||||
%endif
|
||||
|
||||
%build
|
||||
# esbuild
|
||||
rm -f third_party/devtools-frontend/src/third_party/esbuild/esbuild
|
||||
|
Reference in New Issue
Block a user