aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-10-18 11:46:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-18 16:09:46 +0000
commite4442cb0b537720ab32106b3b5353dbb78f11b26 (patch)
treec96d6669865bc85ef278a178d501bd60d29cc2eb /include
parentb4379132d12cd11e52944331487b045f1f32989d (diff)
convert mapHomogeneousPoints to SkPoint3
SkMatrix::mapHomogeneousPoints takes an array of SkScalar, but expects essentially SkPoint3, so make it so. R: robertphillips@google.com, reed@google.com Bug: skia:6898 Change-Id: Ibaf8b05c08b7df16c67d6a77d914667ace9a70da Reviewed-on: https://skia-review.googlesource.com/58380 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkMatrix.h9
-rw-r--r--include/core/SkPoint3.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 277473790a..7e45911225 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -13,6 +13,7 @@
#include "SkRect.h"
struct SkRSXform;
+struct SkPoint3;
class SkString;
/** \class SkMatrix
@@ -475,13 +476,13 @@ public:
and write the transformed points into the array of scalars specified by dst.
dst[] = M * src[]
@param dst Where the transformed coordinates are written. It must
- contain at least 3 * count entries
+ contain at least count entries
@param src The original coordinates that are to be transformed. It
- must contain at least 3 * count entries
- @param count The number of triples (homogeneous points) in src to read,
+ must contain at least count entries
+ @param count The number of homogeneous points in src to read,
and then transform into dst.
*/
- void mapHomogeneousPoints(SkScalar dst[], const SkScalar src[], int count) const;
+ void mapHomogeneousPoints(SkPoint3 dst[], const SkPoint3 src[], int count) const;
void mapXY(SkScalar x, SkScalar y, SkPoint* result) const {
SkASSERT(result);
diff --git a/include/core/SkPoint3.h b/include/core/SkPoint3.h
index 6f69f1c4ea..d4a2023082 100644
--- a/include/core/SkPoint3.h
+++ b/include/core/SkPoint3.h
@@ -8,7 +8,7 @@
#ifndef SkPoint3_DEFINED
#define SkPoint3_DEFINED
-#include "SkScalar.h"
+#include "SkPoint.h"
struct SK_API SkPoint3 {
SkScalar fX, fY, fZ;