aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLineClipper.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-02-09 08:33:07 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-09 08:33:07 -0800
commit31223e0cb74f47f63b094520a9830c525b72fe87 (patch)
treee8d733c11acb5c64c089fca92e0cc868f49fb7e3 /src/core/SkLineClipper.cpp
parent70a8ca8351b0338b7d63917a818433dc8d71d291 (diff)
cull edges that are to the right of the clip
Diffstat (limited to 'src/core/SkLineClipper.cpp')
-rw-r--r--src/core/SkLineClipper.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/SkLineClipper.cpp b/src/core/SkLineClipper.cpp
index 3ff8948913..4558430e33 100644
--- a/src/core/SkLineClipper.cpp
+++ b/src/core/SkLineClipper.cpp
@@ -1,10 +1,10 @@
-
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
#include "SkLineClipper.h"
template <typename T> T pin_unsorted(T value, T limit0, T limit1) {
@@ -172,12 +172,8 @@ static void sect_with_horizontal_test_for_pin_results() {
}
#endif
-int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip,
- SkPoint lines[], bool canClipToTheRight) {
-#if 1
- // Disable this while we investigate layouttest failures
- canClipToTheRight = false;
-#endif
+int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip, SkPoint lines[],
+ bool canCullToTheRight) {
#ifdef SK_DEBUG
{
@@ -246,7 +242,7 @@ 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) {
+ if (canCullToTheRight) {
return 0;
}
tmp[0].fX = tmp[1].fX = clip.fRight;