diff options
author | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-12-29 16:09:31 +0000 |
---|---|---|
committer | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-12-29 16:09:31 +0000 |
commit | a31ac73b8e261f02c4bd6ae1d622c4bd00226b80 (patch) | |
tree | 1604872996a19eb01b90ac0a11b0b8104a5726b0 /src/core | |
parent | 797d514ab03b9a5edc27b8dac66b910d649225cd (diff) |
Tighten up restrictions on blit width: some shaders assert that they
are addressing more than 0 pixels.
codereview.appspot.com/5489125/
git-svn-id: http://skia.googlecode.com/svn/trunk@2935 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBlitter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index 265ae6b6ef..8bb4b4f20a 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -47,7 +47,7 @@ void SkBlitter::blitV(int x, int y, int height, SkAlpha alpha) { } void SkBlitter::blitRect(int x, int y, int width, int height) { - SkASSERT(width >= 0); + SkASSERT(width > 0); while (--height >= 0) { this->blitH(x, y++, width); } @@ -59,7 +59,7 @@ void SkBlitter::blitRect(int x, int y, int width, int height) { void SkBlitter::blitAntiRect(int x, int y, int width, int height, SkAlpha leftAlpha, SkAlpha rightAlpha) { this->blitV(x++, y, height, leftAlpha); - if (width >= 0) { + if (width > 0) { this->blitRect(x, y, width, height); x += width; } |