mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
2a79f0a78e
From 35a22019f62d4e13a293e9d576b6a692b0411ac8 Mon Sep 17 00:00:00 2001
40 lines
2.3 KiB
Diff
40 lines
2.3 KiB
Diff
From: George Wright <gwright@mozilla.com>
|
|
Date: Thu, 20 Jun 2013 09:21:21 -0400
|
|
Subject: Bug 848491 - Re-apply bug 795538 - Ensure we use the correct colour (and alpha) for the clamp values r=mattwoodrow
|
|
|
|
|
|
diff --git a/gfx/skia/src/effects/gradients/SkGradientShader.cpp b/gfx/skia/src/effects/gradients/SkGradientShader.cpp
|
|
index 27a9c46..ce077b5 100644
|
|
--- a/gfx/skia/src/effects/gradients/SkGradientShader.cpp
|
|
+++ b/gfx/skia/src/effects/gradients/SkGradientShader.cpp
|
|
@@ -500,15 +500,17 @@ const SkPMColor* SkGradientShaderBase::getCache32() const {
|
|
}
|
|
|
|
// Write the clamp colours into the first and last entries of fCache32
|
|
- fCache32[kCache32ClampLower] = SkPackARGB32(fCacheAlpha,
|
|
- SkColorGetR(fOrigColors[0]),
|
|
- SkColorGetG(fOrigColors[0]),
|
|
- SkColorGetB(fOrigColors[0]));
|
|
-
|
|
- fCache32[kCache32ClampUpper] = SkPackARGB32(fCacheAlpha,
|
|
- SkColorGetR(fOrigColors[fColorCount - 1]),
|
|
- SkColorGetG(fOrigColors[fColorCount - 1]),
|
|
- SkColorGetB(fOrigColors[fColorCount - 1]));
|
|
+ fCache32[kCache32ClampLower] = SkPremultiplyARGBInline(SkMulDiv255Round(SkColorGetA(fOrigColors[0]),
|
|
+ fCacheAlpha),
|
|
+ SkColorGetR(fOrigColors[0]),
|
|
+ SkColorGetG(fOrigColors[0]),
|
|
+ SkColorGetB(fOrigColors[0]));
|
|
+
|
|
+ fCache32[kCache32ClampUpper] = SkPremultiplyARGBInline(SkMulDiv255Round(SkColorGetA(fOrigColors[fColorCount - 1]),
|
|
+ fCacheAlpha),
|
|
+ SkColorGetR(fOrigColors[fColorCount - 1]),
|
|
+ SkColorGetG(fOrigColors[fColorCount - 1]),
|
|
+ SkColorGetB(fOrigColors[fColorCount - 1]));
|
|
|
|
return fCache32;
|
|
}
|
|
--
|
|
1.7.11.7
|
|
|