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

Unified Diff: src/core/SkLineClipper.cpp

Issue 1079343002: use fast/inline SkRect::set(p0, p1) for 2 points (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLineClipper.cpp
diff --git a/src/core/SkLineClipper.cpp b/src/core/SkLineClipper.cpp
index 4558430e336da3806b06ef0c1a4cef81ce6d2036..189f03ac735123f7bfa1f3ae7e3d9d03bdde562c 100644
--- a/src/core/SkLineClipper.cpp
+++ b/src/core/SkLineClipper.cpp
@@ -78,7 +78,7 @@ bool SkLineClipper::IntersectLine(const SkPoint src[2], const SkRect& clip,
SkPoint dst[2]) {
SkRect bounds;
- bounds.set(src, 2);
+ bounds.set(src[0], src[1]);
if (containsNoEmptyCheck(clip, bounds)) {
if (src != dst) {
memcpy(dst, src, 2 * sizeof(SkPoint));
@@ -137,7 +137,7 @@ bool SkLineClipper::IntersectLine(const SkPoint src[2], const SkRect& clip,
tmp[index1].set(clip.fRight, sect_with_vertical(src, clip.fRight));
}
#ifdef SK_DEBUG
- bounds.set(tmp, 2);
+ bounds.set(tmp[0], tmp[1]);
SkASSERT(containsNoEmptyCheck(clip, bounds));
#endif
memcpy(dst, tmp, sizeof(tmp));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698