diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-03-19 21:52:42 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-03-19 21:52:42 +0000 |
commit | 98388345db8a56e12e25b02b56a5d843376cb3db (patch) | |
tree | c534651c180de794a956ed720ee1d4ab8cfab703 /effects | |
parent | 032c42f49ff6629726be020c5f093c64a4847c19 (diff) | |
download | src-98388345db8a56e12e25b02b56a5d843376cb3db.tar.gz |
promote SkMask's rowBytes to 32bits, since its bounds is a 32bit rect
be sure a rect is sorted before using it as the path's bounds cache
git-svn-id: http://skia.googlecode.com/svn/trunk/src@128 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'effects')
-rw-r--r-- | effects/SkBlurMask.cpp | 4 | ||||
-rw-r--r-- | effects/SkLayerRasterizer.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/effects/SkBlurMask.cpp b/effects/SkBlurMask.cpp index a7b32029..416eda42 100644 --- a/effects/SkBlurMask.cpp +++ b/effects/SkBlurMask.cpp @@ -228,7 +228,7 @@ bool SkBlurMask::Blur(SkMask* dst, const SkMask& src, dst->fBounds.set(src.fBounds.fLeft - rx, src.fBounds.fTop - ry, src.fBounds.fRight + rx, src.fBounds.fBottom + ry); - dst->fRowBytes = SkToU16(dst->fBounds.width()); + dst->fRowBytes = dst->fBounds.width(); dst->fFormat = SkMask::kA8_Format; dst->fImage = NULL; @@ -277,7 +277,7 @@ bool SkBlurMask::Blur(SkMask* dst, const SkMask& src, if (style == kInner_Style) { dst->fBounds = src.fBounds; // restore trimmed bounds - dst->fRowBytes = SkToU16(dst->fBounds.width()); + dst->fRowBytes = dst->fBounds.width(); } #if 0 diff --git a/effects/SkLayerRasterizer.cpp b/effects/SkLayerRasterizer.cpp index 390e3a32..ad16ea83 100644 --- a/effects/SkLayerRasterizer.cpp +++ b/effects/SkLayerRasterizer.cpp @@ -107,7 +107,7 @@ bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix, if (SkMask::kComputeBoundsAndRenderImage_CreateMode == mode) { mask->fFormat = SkMask::kA8_Format; - mask->fRowBytes = SkToU16(mask->fBounds.width()); + mask->fRowBytes = mask->fBounds.width(); mask->fImage = SkMask::AllocImage(mask->computeImageSize()); memset(mask->fImage, 0, mask->computeImageSize()); } |