Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1282)

Unified Diff: src/core/SkBlitter.cpp

Issue 2393643002: Resubmit issue 2221103002 to fix the iOS build by declaring the flag in (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkAnalyticEdge.cpp ('k') | src/core/SkEdge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
}
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/core/SkAnalyticEdge.cpp ('k') | src/core/SkEdge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698