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
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 265ae6b..8bb4b4f 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -47,7 +47,7 @@
}
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::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;
}