From c60fee0f15c73137c4e335de04e9ca06e131b110 Mon Sep 17 00:00:00 2001 From: herb Date: Mon, 7 Mar 2016 09:17:47 -0800 Subject: Rework files and add test cases. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1757193002 Review URL: https://codereview.chromium.org/1757193002 --- src/core/SkLinearBitmapPipeline_tile.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/SkLinearBitmapPipeline_tile.h') diff --git a/src/core/SkLinearBitmapPipeline_tile.h b/src/core/SkLinearBitmapPipeline_tile.h index 2f855a36af..761e3c57eb 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); -- cgit v1.2.3