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

Unified Diff: src/core/SkLinearBitmapPipeline_tile.h

Issue 2145193002: Fix a bug in the Clamp in X direction tiling. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLinearBitmapPipeline_tile.h
diff --git a/src/core/SkLinearBitmapPipeline_tile.h b/src/core/SkLinearBitmapPipeline_tile.h
index 6fe64f1bce4c5ffd3dd5c8ee1f598c0332320e5f..39d79a0061e23f69d0b57193b1d868870cbc18a6 100644
--- a/src/core/SkLinearBitmapPipeline_tile.h
+++ b/src/core/SkLinearBitmapPipeline_tile.h
@@ -90,19 +90,18 @@ public:
next->pointSpan(span);
}
} else {
- Span center = span.breakAt(fXMax, dx);
-
- if (!span.isEmpty()) {
- span.clampToSinglePixel({fXMax - 1, y});
- next->pointSpan(span);
+ Span rightClamped = span.breakAt(fXMax, dx);
+ if (!rightClamped.isEmpty()) {
+ rightClamped.clampToSinglePixel({fXMax - 1, y});
+ next->pointSpan(rightClamped);
}
- Span leftEdge = center.breakAt(0.0f, dx);
+ Span center = span.breakAt(0.0f, dx);
if (!center.isEmpty()) {
next->pointSpan(center);
}
- if (!leftEdge.isEmpty()) {
- leftEdge.clampToSinglePixel({0.0f, y});
- next->pointSpan(leftEdge);
+ if (!span.isEmpty()) {
+ span.clampToSinglePixel({0.0f, y});
+ next->pointSpan(span);
}
}
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698