aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLineClipper.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-02-07 12:18:41 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-07 12:18:41 -0800
commit01d3319b67b1ad404006a0026803efc1573f4570 (patch)
treec350a7e529a518fa74befb485332bb767257bf35 /src/core/SkLineClipper.cpp
parent5cc0f6c1ac6636efaf4da775f464a0288fef04e7 (diff)
Faster edge re-sort
For now, disable dropping trailing edges This reverts commit 0692c5f2c1df7d1b66c62025200dd666f9ecd311. BUG=skia: TBR= Review URL: https://codereview.chromium.org/882733004
Diffstat (limited to 'src/core/SkLineClipper.cpp')
-rw-r--r--src/core/SkLineClipper.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/SkLineClipper.cpp b/src/core/SkLineClipper.cpp
index 1645917d70..3ff8948913 100644
--- a/src/core/SkLineClipper.cpp
+++ b/src/core/SkLineClipper.cpp
@@ -173,7 +173,12 @@ 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) {
+#if 1
+ // Disable this while we investigate layouttest failures
+ canClipToTheRight = false;
+#endif
+
#ifdef SK_DEBUG
{
static bool gOnce;
@@ -241,6 +246,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;