diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-31 14:14:18 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-31 14:14:18 +0000 |
commit | 562a2ac95b8cd8b359574f8c4d6300b0475938db (patch) | |
tree | e1c9b15bd0f7e5fd1de6ddec4da256457799ad5c /src | |
parent | effe847ca4ed731a60c69e435354e446f46f8090 (diff) |
call blitRect in our convex scanconverter (next: take advantage of that in our
region and soft-region builders, and in our supersampler)
git-svn-id: http://skia.googlecode.com/svn/trunk@2563 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkAAClip.cpp | 8 | ||||
-rw-r--r-- | src/core/SkScan_AntiPath.cpp | 12 | ||||
-rw-r--r-- | src/core/SkScan_Path.cpp | 4 |
3 files changed, 7 insertions, 17 deletions
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index 47c650e9a2..9225061aa2 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -1021,8 +1021,12 @@ public: virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { unexpected(); } - // let the default impl call blitH -// virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE + virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE { +// SkDebugf("blitRect Y:%d H:%d\n", y, height); + while (--height >= 0) { + this->blitH(x, y++, width); + } + } virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE { unexpected(); } diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index fae5cb2e7e..277d6e26c5 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -47,9 +47,6 @@ public: virtual void blitV(int x, int y, int height, SkAlpha alpha) { SkASSERT(!"How did I get here?"); } - virtual void blitRect(int x, int y, int width, int height) { - SkASSERT(!"How did I get here?"); - } protected: SkBlitter* fRealBlitter; @@ -97,7 +94,6 @@ public: void flush(); virtual void blitH(int x, int y, int width); - virtual void blitRect(int x, int y, int width, int height); private: SkAlphaRuns fRuns; @@ -197,14 +193,6 @@ void SuperBlitter::blitH(int x, int y, int width) { #endif } -void SuperBlitter::blitRect(int x, int y, int width, int height) { - for (int i = 0; i < height; ++i) { - blitH(x, y + i, width); - } - - flush(); -} - /////////////////////////////////////////////////////////////////////////////// class MaskSuperBlitter : public BaseSuperBlitter { diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp index 00013ce0a2..fe04084395 100644 --- a/src/core/SkScan_Path.cpp +++ b/src/core/SkScan_Path.cpp @@ -255,14 +255,12 @@ static void walk_convex_edges(SkEdge* prevHead, SkPath::FillType, SkFixed dRite = riteE->fDX; int count = local_bot - local_top; SkASSERT(count >= 0); -// if (0 == (dLeft | dRite)) { - if (false) { + if (0 == (dLeft | dRite)) { int L = (left + SK_Fixed1/2) >> 16; int R = (rite + SK_Fixed1/2) >> 16; if (L < R) { count += 1; blitter->blitRect(L, local_top, R - L, count); - local_top = local_bot + 1; left += count * dLeft; rite += count * dRite; } |