void-packages/srcpkgs/electron12/files/patches/chromium-89-skia-CropRect.p...

39 lines
2.1 KiB
Diff
Raw Normal View History

2021-03-14 19:24:18 +01:00
diff --git a/third_party/skia/include/effects/SkImageFilters.h b/third_party/skia/include/effects/SkImageFilters.h
index 04cce0a..d06b007 100644
--- third_party/skia/include/effects/SkImageFilters.h
+++ third_party/skia/include/effects/SkImageFilters.h
@@ -23,6 +23,9 @@ class SkColorFilter;
class SkPaint;
class SkRegion;
+constexpr SkRect kNoCropRect = {SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity,
+ SK_ScalarInfinity, SK_ScalarInfinity};
+
// A set of factory functions providing useful SkImageFilter effects. For image filters that take an
// input filter, providing nullptr means it will automatically use the dynamic source image. This
// source depends on how the filter is applied, but is either the contents of a saved layer when
@@ -33,8 +36,6 @@ public:
// to those types as a crop rect for the image filter factories. It's not intended to be used
// directly.
struct CropRect {
- static constexpr SkRect kNoCropRect = {SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity,
- SK_ScalarInfinity, SK_ScalarInfinity};
CropRect() : fCropRect(kNoCropRect) {}
// Intentionally not explicit so callers don't have to use this type but can use SkIRect or
// SkRect as desired.
diff --git a/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp b/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
index 5290b00..fb97fc1 100644
--- third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
+++ third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
@@ -47,10 +47,6 @@ static SkImageFilter::CropRect to_legacy_crop_rect(const SkImageFilters::CropRec
: SkImageFilter::CropRect(SkRect::MakeEmpty(), 0x0);
}
-// Allow kNoCropRect to be referenced (for certain builds, e.g. macOS libFuzzer chromium target,
-// see crbug.com/1139725)
-constexpr SkRect SkImageFilters::CropRect::kNoCropRect;
-
void SkImageFilters::RegisterFlattenables() {
SkAlphaThresholdFilter::RegisterFlattenables();
SkArithmeticImageFilter::RegisterFlattenables();