Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: include/core/SkShader.h

Issue 386693003: Use SkShader's localMat for SkLocalMatrixShader. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Refine comment. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkReadBuffer.h ('k') | src/core/SkLocalMatrixShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkShader.h
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 8871f1b02131daac82f4aaf43d52721c532dc846..33a7a15b0f01b2f1628cb155331fba9ab0ede34a 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -41,11 +41,17 @@ public:
/**
* Returns the local matrix.
+ *
+ * FIXME: This can be incorrect for a Shader with its own local matrix
+ * that is also wrapped via CreateLocalMatrixShader.
*/
const SkMatrix& getLocalMatrix() const { return fLocalMatrix; }
/**
* Returns true if the local matrix is not an identity matrix.
+ *
+ * FIXME: This can be incorrect for a Shader with its own local matrix
+ * that is also wrapped via CreateLocalMatrixShader.
*/
bool hasLocalMatrix() const { return !fLocalMatrix.isIdentity(); }
@@ -474,7 +480,10 @@ protected:
private:
SkMatrix fLocalMatrix;
-
+
+ // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer constructor.
+ friend class SkLocalMatrixShader;
+
typedef SkFlattenable INHERITED;
};
« no previous file with comments | « include/core/SkReadBuffer.h ('k') | src/core/SkLocalMatrixShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698