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

Unified Diff: src/core/SkEdgeClipper.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/SkEdgeClipper.cpp
diff --git a/src/core/SkEdgeClipper.cpp b/src/core/SkEdgeClipper.cpp
index 00a1dd2494bf2e6d36e84388ca7d0777c543c540..32277bcf8e3cc89064dc834a07add63efc6558f0 100644
--- a/src/core/SkEdgeClipper.cpp
+++ b/src/core/SkEdgeClipper.cpp
@@ -148,7 +148,9 @@ void SkEdgeClipper::clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip) {
return;
}
if (pts[0].fX >= clip.fRight) { // wholly to the right
- this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse);
+ if (!this->canCullToTheRight()) {
+ this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse);
+ }
return;
}
@@ -350,7 +352,9 @@ void SkEdgeClipper::clipMonoCubic(const SkPoint src[4], const SkRect& clip) {
return;
}
if (pts[0].fX >= clip.fRight) { // wholly to the right
- this->appendVLine(clip.fRight, pts[0].fY, pts[3].fY, reverse);
+ if (!this->canCullToTheRight()) {
+ this->appendVLine(clip.fRight, pts[0].fY, pts[3].fY, reverse);
+ }
return;
}
« no previous file with comments | « src/core/SkEdgeClipper.h ('k') | src/core/SkLineClipper.h » ('j') | src/core/SkScan_Path.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698