diff options
author | Cary Clark <caryclark@skia.org> | 2017-11-06 20:02:02 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-07 13:10:38 +0000 |
commit | 74f623d1617e0ccf3eddf37aeecabd0ac72369fd (patch) | |
tree | 60e29c63d4f695073d538b1ce1c590c6e6df059f /gm/beziereffects.cpp | |
parent | b49d7b0118789dbd8c54b95d40f6163e0a134ef3 (diff) |
make point array methods private
Moved method are not used by chromium, google3,
or android.
SkPoint::setRectIFan isn't used or tested at all.
SkPoint::setRectFan and SkPoint::setRectTriStrip
are only used internally.
These routines pretend that a SkPoint is part
of an array of points. Since that's kind of an
odd contract to make public, and because they
aren't used outside of Skia, relegate them to
a priv file.
R=bsalomon@google.com,reed@google.com
Bug: skia: 6898
Change-Id: I5ec2eb47799f6fd4b2994da962b1fa69ce659931
Reviewed-on: https://skia-review.googlesource.com/68121
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'gm/beziereffects.cpp')
-rw-r--r-- | gm/beziereffects.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp index 045f3fe26b..7316a79a90 100644 --- a/gm/beziereffects.cpp +++ b/gm/beziereffects.cpp @@ -19,6 +19,7 @@ #include "SkColorPriv.h" #include "SkGeometry.h" #include "SkPoint3.h" +#include "SkPointPriv.h" #include "effects/GrBezierEffect.h" #include "ops/GrMeshDrawOp.h" @@ -93,7 +94,7 @@ private: return; } SkRect rect = this->rect(); - pts[0].setRectTriStrip(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, vertexStride); + SkPointPriv::SetRectTriStrip(pts, rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, vertexStride); helper.recordDraw(target, this->gp(), this->makePipeline(target)); } @@ -268,8 +269,8 @@ private: return; } SkRect rect = this->rect(); - verts[0].fPosition.setRectTriStrip(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, - sizeof(Vertex)); + SkPointPriv::SetRectTriStrip(&verts[0].fPosition, rect.fLeft, rect.fTop, rect.fRight, + rect.fBottom, sizeof(Vertex)); for (int v = 0; v < 4; ++v) { SkPoint3 pt3 = {verts[v].fPosition.x(), verts[v].fPosition.y(), 1.f}; fKLM.mapHomogeneousPoints((SkPoint3* ) verts[v].fKLM, &pt3, 1); @@ -482,8 +483,8 @@ private: return; } SkRect rect = this->rect(); - verts[0].fPosition.setRectTriStrip(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, - sizeof(Vertex)); + SkPointPriv::SetRectTriStrip(&verts[0].fPosition, rect.fLeft, rect.fTop, rect.fRight, + rect.fBottom, sizeof(Vertex)); fDevToUV.apply<4, sizeof(Vertex), sizeof(SkPoint)>(verts); helper.recordDraw(target, this->gp(), this->makePipeline(target)); } |