remove obsolete state
authorreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 12 Jan 2009 16:00:23 +0000 (16:00 +0000)
committerreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 12 Jan 2009 16:00:23 +0000 (16:00 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@62 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkBitmapProcState.cpp
src/core/SkBitmapProcState.h

index 428921d..aa03f59 100644 (file)
@@ -333,20 +333,6 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
     fInvSx          = SkScalarToFixed(m->getScaleX());
     fInvSy          = SkScalarToFixed(m->getScaleY());
     fInvKy          = SkScalarToFixed(m->getSkewY());
-    fInvTxPlusHalf  = SkScalarToFixed(m->getTranslateX()) + (fInvSx >> 1);
-    fInvTyPlusHalf  = SkScalarToFixed(m->getTranslateY()) + (fInvSy >> 1);
-
-    /*  the -1 keeps us symetric with general policy for rounding, which is
-        (x + 1/2) >> 16. This sends exact halves to the next large pixel
-        e.g. x==3.5, round(x) == 4. However, our state is working with the
-        inverse matrix, and so to match the result of "normal" rounding, we
-        subtract 1 so that we in effect behave the same at the half-way point.
-        To compare, try drawing a bitmap with y == exact-half using the sprite
-        blitters and with us. Without the -1, we will draw the colors a whole
-        pixel shifted up (yikes).
-    */
-    fInvTxPlusHalf -= 1;
-    fInvTyPlusHalf -= 1;
 
     fAlphaScale = SkAlpha255To256(paint.getAlpha());
 
index 1366d3b..561bdb7 100644 (file)
@@ -61,8 +61,6 @@ struct SkBitmapProcState {
     SkMatrix::MapXYProc fInvProc;           // chooseProcs
     SkFixed             fInvSx, fInvSy;     // chooseProcs
     SkFixed             fInvKy;             // chooseProcs
-    SkFixed             fInvTxPlusHalf;     // chooseProcs
-    SkFixed             fInvTyPlusHalf;     // chooseProcs
     uint16_t            fAlphaScale;        // chooseProcs
     uint8_t             fInvType;           // chooseProcs
     uint8_t             fTileModeX;         // CONSTRUCTOR