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

Unified Diff: src/core/SkMatrix.cpp

Issue 803493008: Fix overlap test for 64-bit pointers in SkMatrix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: same style as in mapPoints Created 5 years, 11 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/SkMatrix.cpp
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 77036bc454c9430132bf71b1d686a14fdc6d03fe..9658177ec913e3b3e091104d31224e798532df70 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -1025,7 +1025,7 @@ void SkMatrix::mapPoints(SkPoint dst[], const SkPoint src[], int count) const {
void SkMatrix::mapHomogeneousPoints(SkScalar dst[], const SkScalar src[], int count) const {
SkASSERT((dst && src && count > 0) || 0 == count);
// no partial overlap
- SkASSERT(src == dst || SkAbs32((int32_t)(src - dst)) >= 3*count);
+ SkASSERT(src == dst || &dst[3*count] <= &src[0] || &src[3*count] <= &dst[0]);
if (count > 0) {
if (this->isIdentity()) {
« 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