aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkShader.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-12 20:42:21 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-12 20:42:21 +0000
commit5970f625e96cdc007c563ae72f343ae0d71719a1 (patch)
treed8768c59927628cabd07ab50f9a3b8e6e6779b84 /include/core/SkShader.h
parent68a3815401f461976f76891d0477cb1440fa0aba (diff)
re-land hide get/setLocalMatrix
This reverts commit b1d702a43b07934f5b001b1b09db2c57ede909a1. TBR=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/279903002 git-svn-id: http://skia.googlecode.com/svn/trunk@14702 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkShader.h')
-rw-r--r--include/core/SkShader.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index a9ecad84c1..ce5f003873 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