diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkDraw.cpp | 6 | ||||
-rw-r--r-- | src/core/SkPath.cpp | 2 | ||||
-rw-r--r-- | src/core/SkScalerContext.cpp | 2 | ||||
-rw-r--r-- | src/core/SkScan_Antihair.cpp | 18 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 55530f59f9..60c474a970 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -1250,7 +1250,7 @@ static void D1G_NoBounder_RectClip(const SkDraw1Glyph& state, } mask.fRowBytes = glyph.rowBytes(); - mask.fFormat = (SkMask::Format)glyph.fMaskFormat; + mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat); mask.fImage = aa; state.fBlitter->blitMask(mask, *bounds); } @@ -1280,7 +1280,7 @@ static void D1G_NoBounder_RgnClip(const SkDraw1Glyph& state, } mask.fRowBytes = glyph.rowBytes(); - mask.fFormat = (SkMask::Format)glyph.fMaskFormat; + mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat); mask.fImage = (uint8_t*)aa; do { state.fBlitter->blitMask(mask, cr); @@ -1313,7 +1313,7 @@ static void D1G_Bounder(const SkDraw1Glyph& state, if (state.fBounder->doIRect(cr)) { mask.fRowBytes = glyph.rowBytes(); - mask.fFormat = (SkMask::Format)glyph.fMaskFormat; + mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat); mask.fImage = (uint8_t*)aa; do { state.fBlitter->blitMask(mask, cr); diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 97b366d689..da90227125 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -62,7 +62,7 @@ private: fPath = path; fDirty = path->fFastBoundsIsDirty; fEmpty = path->isEmpty(); - // can't use fRect for our bounds unless we know is upright and proper + // Cannot use fRect for our bounds unless we know it is sorted fRect.sort(); } }; diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 9d028318bc..b271970ddc 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -41,7 +41,7 @@ void SkGlyph::toMask(SkMask* mask) const { mask->fImage = (uint8_t*)fImage; mask->fBounds.set(fLeft, fTop, fLeft + fWidth, fTop + fHeight); mask->fRowBytes = this->rowBytes(); - mask->fFormat = (SkMask::Format)fMaskFormat; + mask->fFormat = static_cast<SkMask::Format>(fMaskFormat); } size_t SkGlyph::computeImageSize() const { diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp index b54057344d..e3ee900718 100644 --- a/src/core/SkScan_Antihair.cpp +++ b/src/core/SkScan_Antihair.cpp @@ -27,7 +27,7 @@ NULL (for speed), and thus draw outside of the clip by a pixel, which might only look bad, but it might also access memory outside of the valid range allcoated for the device bitmap. - + This define enables our fix to outset our "bounds" by 1, thus avoiding the chance of the bug, but at the cost of sometimes taking the rectblitter case (i.e. not setting the clip to NULL) when we might not actually need @@ -305,10 +305,10 @@ static void do_anti_hairline(SkFDot6 x0, SkFDot6 y0, SkFDot6 x1, SkFDot6 y1, bottom = SkFixedCeil(fstart + SK_FixedHalf); top = SkFixedFloor(fstart + (istop - istart - 1) * slope - SK_FixedHalf); } - if (OUTSET_BEFORE_CLIP_TEST) { - top -= 1; - bottom += 1; - } +#ifdef OUTSET_BEFORE_CLIP_TEST + top -= 1; + bottom += 1; +#endif if (top >= clip->fBottom || bottom <= clip->fTop) return; if (clip->fTop <= top && clip->fBottom >= bottom) @@ -382,10 +382,10 @@ static void do_anti_hairline(SkFDot6 x0, SkFDot6 y0, SkFDot6 x1, SkFDot6 y1, right = SkFixedCeil(fstart + SK_FixedHalf); left = SkFixedFloor(fstart + (istop - istart - 1) * slope - SK_FixedHalf); } - if (OUTSET_BEFORE_CLIP_TEST) { - left -= 1; - right += 1; - } +#ifdef OUTSET_BEFORE_CLIP_TEST + left -= 1; + right += 1; +#endif if (left >= clip->fRight || right <= clip->fLeft) return; if (clip->fLeft <= left && clip->fRight >= right) |