27 lines
1.3 KiB
Diff
27 lines
1.3 KiB
Diff
Patch-Source: https://src.fedoraproject.org/rpms/chromium/blob/1f8fd846d2cc72c90c73c9867619f0da43b9c816/f/chromium-115-compiler-SkColor4f.patch
|
|
--- a/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
|
|
+++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
|
|
@@ -76,6 +76,7 @@ bool ParseCanvasColorString(const String
|
|
|
|
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
|
|
float global_alpha) const {
|
|
+ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
|
|
switch (type_) {
|
|
case kColor:
|
|
ApplyColorToFlags(flags, global_alpha);
|
|
@@ -83,12 +84,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
|
|
case kGradient:
|
|
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
|
|
ImageDrawOptions());
|
|
- flags.setColor(SkColor4f{0.0f, 0.0f, 0.0f, global_alpha});
|
|
+ flags.setColor(custom_color);
|
|
break;
|
|
case kImagePattern:
|
|
GetCanvasPattern()->GetPattern()->ApplyToFlags(
|
|
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
|
|
- flags.setColor(SkColor4f{0.0f, 0.0f, 0.0f, global_alpha});
|
|
+ flags.setColor(custom_color);
|
|
break;
|
|
default:
|
|
NOTREACHED();
|