Chromium Code Reviews| Index: include/core/SkMatrix.h |
| diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h |
| index 97a53505ef3734ae36de8d5e0799b07d4c4e075a..0a0f3cf96ac61ffedcbbb92e554257151d1ca71f 100644 |
| --- a/include/core/SkMatrix.h |
| +++ b/include/core/SkMatrix.h |
| @@ -635,15 +635,17 @@ public: |
| /** |
| * Calculates the minimum scaling factor of the matrix as computed from the SVD of the upper |
| - * left 2x2. If the matrix has perspective -1 is returned. |
| + * left 2x2. If the max scale factor cannot be computed (for example overflow or perspective) |
| + * -1 is returned. |
| * |
| - * @return minumum scale factor |
| + * @return minimum scale factor |
| */ |
| SkScalar getMinScale() const; |
| /** |
| * Calculates the maximum scaling factor of the matrix as computed from the SVD of the upper |
| - * left 2x2. If the matrix has perspective -1 is returned. |
| + * left 2x2. If the max scale factor cannot be computed (for example overflow or perspective) |
| + * -1 is returned. |
| * |
| * @return maximum scale factor |
| */ |
| @@ -651,8 +653,8 @@ public: |
| /** |
| * Gets both the min and max scale factors. The min scale factor is scaleFactors[0] and the max |
| - * is scaleFactors[1]. If the matrix has perspective false will be returned and scaleFactors |
| - * will be unchanged. |
| + * is scaleFactors[1]. If the min/max scale factors cannot be computed false is returned and the |
| + * values of scaleFactors[] are undefined. |
|
reed1
2015/12/17 21:04:26
consider adding SK_WARN_UNUSED_RESULT ?
|
| */ |
| bool getMinMaxScales(SkScalar scaleFactors[2]) const; |