Index: src/core/SkLinearBitmapPipeline.cpp |
diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp |
index 415179a0b1683e4ac612bdb3be17bbcb656b6977..221f74d30df84467b3018e06d2d9160a553ba84b 100644 |
--- a/src/core/SkLinearBitmapPipeline.cpp |
+++ b/src/core/SkLinearBitmapPipeline.cpp |
@@ -584,11 +584,13 @@ public: |
void pointSpan(Span span) override { |
SkASSERT(fDest + span.count() <= fEnd); |
- int32_t x = (int32_t)span.startX(); |
- int32_t y = (int32_t)span.startY(); |
- const uint32_t* src = this->pixelAddress(x, y); |
- memmove(fDest, src, span.count() * sizeof(uint32_t)); |
- fDest += span.count(); |
+ if (span.length() != 0.0f) { |
+ int32_t x = (int32_t)span.startX(); |
Brian Osman
2016/04/25 20:00:18
Should these be using SkScalarFloorToInt, just to
herb_g
2016/04/25 20:36:36
At this point, I know that startX > 0, so I want t
|
+ int32_t y = (int32_t)span.startY(); |
+ const uint32_t* src = this->pixelAddress(x, y); |
+ memmove(fDest, src, span.count() * sizeof(uint32_t)); |
+ fDest += span.count(); |
+ } |
} |
void repeatSpan(Span span, int32_t repeatCount) override { |