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

Unified Diff: src/core/SkLinearBitmapPipeline_tile.h

Issue 1757193002: Add test cases for Clamp and Repeat tiles. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Simplify span breakAt usage, by making breakAt consistant for +/- dx. Created 4 years, 9 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/SkLinearBitmapPipeline_core.h ('k') | tests/SkLinearBitmapPipelineTest.cpp » ('j') | 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 2f855a36af4a704cdf8ab599d6f1e63eb7e841f3..761e3c57ebc7755ee3cdd584e08b3776f5100f82 100644
--- a/src/core/SkLinearBitmapPipeline_tile.h
+++ b/src/core/SkLinearBitmapPipeline_tile.h
@@ -100,6 +100,7 @@ public:
}
} else {
Span rightClamped = span.breakAt(xMax, dx);
+
if (!rightClamped.isEmpty()) {
rightClamped.clampToSinglePixel({xMax - 1, y});
next->pointSpan(rightClamped);
@@ -198,7 +199,7 @@ public:
Span span({x, y}, length, count);
if (dx > 0) {
- while (!span.isEmpty() && span.endX() > xMax) {
+ while (!span.isEmpty() && span.endX() >= xMax) {
Span toDraw = span.breakAt(xMax, dx);
next->pointSpan(toDraw);
span.offset(-xMax);
« no previous file with comments | « src/core/SkLinearBitmapPipeline_core.h ('k') | tests/SkLinearBitmapPipelineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698