projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9aeb2a1
)
use fast/inline SkRect::set(p0, p1) for 2 points
author
reed
<reed@chromium.org>
Mon, 13 Apr 2015 02:07:08 +0000
(19:07 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Mon, 13 Apr 2015 02:07:08 +0000
(19:07 -0700)
10% speedup for clipped haircubics
BUG=skia:
TBR=
NOTRY=True
Review URL: https://codereview.chromium.org/
1079343002
src/core/SkLineClipper.cpp
patch
|
blob
|
history
diff --git
a/src/core/SkLineClipper.cpp
b/src/core/SkLineClipper.cpp
index
4558430
..
189f03a
100644
(file)
--- 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));