Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: src/core/SkLineClipper.cpp

Issue 913503002: cull edges that are to the right of the clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkLineClipper.cpp
diff --git a/src/core/SkLineClipper.cpp b/src/core/SkLineClipper.cpp
index 3ff8948913b3e44c40fb3b43f14000d7aa086b1e..4558430e336da3806b06ef0c1a4cef81ce6d2036 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;
« no previous file with comments | « src/core/SkLineClipper.h ('k') | src/core/SkScan_Path.cpp » ('j') | src/core/SkScan_Path.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698