| Index: ui/gfx/transform.cc
|
| diff --git a/ui/gfx/transform.cc b/ui/gfx/transform.cc
|
| index a0445e45d7491bee4679e1352188845e65878049..88f0942a974f8067df245e8a6c2b1fb7cd803391 100644
|
| --- a/ui/gfx/transform.cc
|
| +++ b/ui/gfx/transform.cc
|
| @@ -407,6 +407,11 @@ void Transform::TransformPoint(Point3F* point) const {
|
| TransformPointInternal(matrix_, point);
|
| }
|
|
|
| +void Transform::TransformVector(Vector3dF* vector) const {
|
| + DCHECK(vector);
|
| + TransformVectorInternal(matrix_, vector);
|
| +}
|
| +
|
| bool Transform::TransformPointReverse(Point* point) const {
|
| DCHECK(point);
|
|
|
| @@ -520,6 +525,22 @@ void Transform::TransformPointInternal(const SkMatrix44& xform,
|
| }
|
| }
|
|
|
| +void Transform::TransformVectorInternal(const SkMatrix44& xform,
|
| + Vector3dF* vector) const {
|
| + if (xform.isIdentity())
|
| + return;
|
| +
|
| + SkMScalar p[4] = {SkFloatToMScalar(vector->x()),
|
| + SkFloatToMScalar(vector->y()),
|
| + SkFloatToMScalar(vector->z()), 0};
|
| +
|
| + xform.mapMScalars(p);
|
| +
|
| + vector->set_x(p[0]);
|
| + vector->set_y(p[1]);
|
| + vector->set_z(p[2]);
|
| +}
|
| +
|
| void Transform::TransformPointInternal(const SkMatrix44& xform,
|
| Point* point) const {
|
| if (xform.isIdentity())
|
|
|