Chromium Code Reviews| Index: include/core/SkShader.h |
| diff --git a/include/core/SkShader.h b/include/core/SkShader.h |
| index dc93b84749dcc3341174875d5ed07d4f30d655e6..6c9785911f95802dd35bca0fc2ea70b0e583eb58 100644 |
| --- a/include/core/SkShader.h |
| +++ b/include/core/SkShader.h |
| @@ -401,6 +401,23 @@ public: |
| static SkShader* CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy, |
| const SkMatrix* localMatrix = NULL); |
| + /** |
| + * Return a shader that will apply the specified localMatrix to the proxy shader. |
| + * The specified matrix will be applied before any matrix associated with the proxy. |
| + * |
| + * Note: onwership of the proxy is not transferred (though a ref is taken). |
|
scroggo
2014/05/07 14:15:41
ownership*
reed1
2014/05/07 20:37:31
Done.
|
| + */ |
| + static SkShader* CreateLocalMatrixShader(SkShader* proxy, const SkMatrix& localMatrix); |
| + |
| + /** |
| + * If this shader can be represented by another shader + a localMatrix, return that shader |
| + * and, if not NULL, the localMatrix. If not, return NULL and ignore the localMatrix parameter. |
| + * |
| + * Note: the returned shader (if not NULL) will have been ref'd, and it is the responsibility |
| + * of the caller to balance that with unref() when they are done. |
| + */ |
| + virtual SkShader* refLocalMatrixShader(SkMatrix* localMatrix) const; |
| + |
| SK_TO_STRING_VIRT() |
| SK_DEFINE_FLATTENABLE_TYPE(SkShader) |