Index: include/core/SkShader.h |
diff --git a/include/core/SkShader.h b/include/core/SkShader.h |
index a9ecad84c19c5cca89d287facc67a3bac5ef3ba8..ce5f00387339158267df4f6ee3f90b6a32f95b5e 100644 |
--- a/include/core/SkShader.h |
+++ b/include/core/SkShader.h |
@@ -38,14 +38,15 @@ public: |
virtual ~SkShader(); |
/** |
- * Returns true if the local matrix is not an identity matrix. |
+ * Returns the local matrix. |
*/ |
- bool hasLocalMatrix() const { return !fLocalMatrix.isIdentity(); } |
+ const SkMatrix& getLocalMatrix() const { return fLocalMatrix; } |
+#ifdef SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX |
/** |
- * Returns the local matrix. |
+ * Returns true if the local matrix is not an identity matrix. |
*/ |
- const SkMatrix& getLocalMatrix() const { return fLocalMatrix; } |
+ bool hasLocalMatrix() const { return !fLocalMatrix.isIdentity(); } |
/** |
* Set the shader's local matrix. |
@@ -57,6 +58,7 @@ public: |
* Reset the shader's local matrix to identity. |
*/ |
void resetLocalMatrix() { fLocalMatrix.reset(); } |
+#endif |
enum TileMode { |
/** replicate the edge color if the shader draws outside of its |