Index: src/core/SkLineClipper.cpp |
diff --git a/src/core/SkLineClipper.cpp b/src/core/SkLineClipper.cpp |
index 1645917d70f5d60ba9722ef2301f12aa6530355d..9d72ea513af26546effb630908285521129a7d72 100644 |
--- a/src/core/SkLineClipper.cpp |
+++ b/src/core/SkLineClipper.cpp |
@@ -173,7 +173,7 @@ static void sect_with_horizontal_test_for_pin_results() { |
#endif |
int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip, |
- SkPoint lines[]) { |
+ SkPoint lines[], bool canClipToTheRight) { |
#ifdef SK_DEBUG |
{ |
static bool gOnce; |
@@ -241,6 +241,9 @@ int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip, |
result = tmp; |
reverse = false; |
} else if (tmp[index0].fX >= clip.fRight) { // wholly to the right |
+ if (canClipToTheRight) { |
+ return 0; |
+ } |
tmp[0].fX = tmp[1].fX = clip.fRight; |
result = tmp; |
reverse = false; |