From 2e86178f2bbfc866c627eb1fee926bd7969144f7 Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Mon, 12 Jan 2009 16:00:23 +0000 Subject: [PATCH] remove obsolete state git-svn-id: http://skia.googlecode.com/svn/trunk@62 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkBitmapProcState.cpp | 14 -------------- src/core/SkBitmapProcState.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp index 428921d..aa03f59 100644 --- a/src/core/SkBitmapProcState.cpp +++ b/src/core/SkBitmapProcState.cpp @@ -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()); diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h index 1366d3b..561bdb7 100644 --- a/src/core/SkBitmapProcState.h +++ b/src/core/SkBitmapProcState.h @@ -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 -- 2.7.4