fix pad bug introduced during code cleanup
git-svn-id: http://skia.googlecode.com/svn/trunk@8083 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
8fff398043
commit
68a690cb05
@ -1255,15 +1255,10 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
|
||||
margin->set( pad, pad );
|
||||
}
|
||||
|
||||
int shadow_left = -pad;
|
||||
int shadow_top = -pad;
|
||||
int shadow_right = (int)(src.width()) + pad;
|
||||
int shadow_bottom = (int)(src.height()) + pad;
|
||||
|
||||
dst->fBounds.set(SkScalarRoundToInt(shadow_left + src.fLeft),
|
||||
SkScalarRoundToInt(shadow_top + src.fTop),
|
||||
SkScalarRoundToInt(shadow_right + src.fRight),
|
||||
SkScalarRoundToInt(shadow_bottom + src.fBottom));
|
||||
dst->fBounds.set(SkScalarRoundToInt(src.fLeft - pad),
|
||||
SkScalarRoundToInt(src.fTop - pad),
|
||||
SkScalarRoundToInt(src.fRight + pad),
|
||||
SkScalarRoundToInt(src.fBottom + pad));
|
||||
|
||||
dst->fRowBytes = dst->fBounds.width();
|
||||
dst->fFormat = SkMask::kA8_Format;
|
||||
@ -1274,7 +1269,10 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
|
||||
|
||||
if (createMode == SkMask::kJustComputeBounds_CreateMode) {
|
||||
if (style == kInner_Style) {
|
||||
dst->fBounds.set(0, 0, sw, sh); // restore trimmed bounds
|
||||
dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
|
||||
SkScalarRoundToInt(src.fTop),
|
||||
SkScalarRoundToInt(src.fRight),
|
||||
SkScalarRoundToInt(src.fBottom)); // restore trimmed bounds
|
||||
dst->fRowBytes = sw;
|
||||
}
|
||||
return true;
|
||||
@ -1347,7 +1345,10 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
|
||||
}
|
||||
SkMask::FreeImage(dp);
|
||||
|
||||
dst->fBounds.set(0, 0, sw, sh); // restore trimmed bounds
|
||||
dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
|
||||
SkScalarRoundToInt(src.fTop),
|
||||
SkScalarRoundToInt(src.fRight),
|
||||
SkScalarRoundToInt(src.fBottom)); // restore trimmed bounds
|
||||
dst->fRowBytes = sw;
|
||||
|
||||
} else if (style == kOuter_Style) {
|
||||
|
Loading…
Reference in New Issue
Block a user