| Index: src/core/SkBlitter.cpp
|
| diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
|
| index db9fcda93b19fc3b364859b0727de89e3b55888e..b57bd43ad0a4ebe7bd123a03f4afadda235e7f3e 100644
|
| --- a/src/core/SkBlitter.cpp
|
| +++ b/src/core/SkBlitter.cpp
|
| @@ -71,17 +71,22 @@ void SkBlitter::blitRect(int x, int y, int width, int height) {
|
| }
|
| }
|
|
|
| -/// Default implementation doesn't check for any easy optimizations
|
| -/// such as alpha == 0 or 255; also uses blitV(), which some subclasses
|
| +/// Default implementation doesn't check for easy optimizations
|
| +/// such as alpha == 255; also uses blitV(), which some subclasses
|
| /// may not support.
|
| void SkBlitter::blitAntiRect(int x, int y, int width, int height,
|
| SkAlpha leftAlpha, SkAlpha rightAlpha) {
|
| - this->blitV(x++, y, height, leftAlpha);
|
| + if (leftAlpha > 0) { // we may send in x = -1 with leftAlpha = 0
|
| + this->blitV(x, y, height, leftAlpha);
|
| + }
|
| + x++;
|
| if (width > 0) {
|
| this->blitRect(x, y, width, height);
|
| x += width;
|
| }
|
| - this->blitV(x, y, height, rightAlpha);
|
| + if (rightAlpha > 0) {
|
| + this->blitV(x, y, height, rightAlpha);
|
| + }
|
| }
|
|
|
| //////////////////////////////////////////////////////////////////////////////
|
|
|