Fixes shadow colors with alpha value smaller that one. Results were too transparent.

code review: codereview.appspot.com/4267052
skia bug: 170



git-svn-id: http://skia.googlecode.com/svn/trunk@924 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
junov@google.com 2011-03-11 16:45:00 +00:00
parent ac6b97972d
commit a639891117

View File

@ -31,8 +31,11 @@ SkBlurDrawLooper::SkBlurDrawLooper(SkScalar radius, SkScalar dx, SkScalar dy,
if (flags & kOverrideColor_BlurFlag)
{
// Set alpha to 1 for the override since transparency will already
// be baked into the blurred mask.
SkColor opaqueColor = SkColorSetA(color, 255);
//The SrcIn xfer mode will multiply 'color' by the incoming alpha
fColorFilter = SkColorFilter::CreateModeFilter(color, SkXfermode::kSrcIn_Mode);
fColorFilter = SkColorFilter::CreateModeFilter(opaqueColor, SkXfermode::kSrcIn_Mode);
}
else
{