summaryrefslogtreecommitdiffstats
path: root/external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.134
1 files changed, 34 insertions, 0 deletions
diff --git a/external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1 b/external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1
new file mode 100644
index 0000000000..ca58048a75
--- /dev/null
+++ b/external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1
@@ -0,0 +1,34 @@
+From 6169a1fabae1743709bc9641ad43fcbb6a4f62e1 Mon Sep 17 00:00:00 2001
+From: John Stiles <johnstiles@google.com>
+Date: Fri, 24 Nov 2023 09:40:11 -0500
+Subject: [PATCH] Avoid combining extremely large meshes.
+
+Bug: chromium:1505053
+Change-Id: I42f2ff872bbf054686ec7af0cc85ff63055fcfbf
+Reviewed-on: https://skia-review.googlesource.com/c/skia/+/782936
+Commit-Queue: Michael Ludwig <michaelludwig@google.com>
+Reviewed-by: Michael Ludwig <michaelludwig@google.com>
+Auto-Submit: John Stiles <johnstiles@google.com>
+---
+ src/gpu/ganesh/ops/DrawMeshOp.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/gpu/ganesh/ops/DrawMeshOp.cpp b/src/gpu/ganesh/ops/DrawMeshOp.cpp
+index d827009b993..eed2757579e 100644
+--- a/src/gpu/ganesh/ops/DrawMeshOp.cpp
++++ b/src/gpu/ganesh/ops/DrawMeshOp.cpp
+@@ -1178,10 +1178,13 @@ GrOp::CombineResult MeshOp::onCombineIfPossible(GrOp* t, SkArenaAlloc*, const Gr
+ return CombineResult::kCannotCombine;
+ }
+
++ if (fVertexCount > INT32_MAX - that->fVertexCount) {
++ return CombineResult::kCannotCombine;
++ }
+ if (SkToBool(fIndexCount) != SkToBool(that->fIndexCount)) {
+ return CombineResult::kCannotCombine;
+ }
+- if (SkToBool(fIndexCount) && fVertexCount + that->fVertexCount > SkToInt(UINT16_MAX)) {
++ if (SkToBool(fIndexCount) && fVertexCount > UINT16_MAX - that->fVertexCount) {
+ return CombineResult::kCannotCombine;
+ }
+