diff options
Diffstat (limited to 'src/shaders/SkShaderBase.h')
-rw-r--r-- | src/shaders/SkShaderBase.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/shaders/SkShaderBase.h b/src/shaders/SkShaderBase.h index 89674a6ebb..cddc5540ee 100644 --- a/src/shaders/SkShaderBase.h +++ b/src/shaders/SkShaderBase.h @@ -12,6 +12,7 @@ #include "SkMask.h" #include "SkMatrix.h" #include "SkShader.h" +#include "SkTLazy.h" #if SK_SUPPORT_GPU #include "GrFPArgs.h" @@ -185,9 +186,16 @@ public: // If this returns false, then we draw nothing (do not fall back to shader context) bool appendStages(const StageRec&) const; - bool computeTotalInverse(const SkMatrix& ctm, - const SkMatrix* outerLocalMatrix, - SkMatrix* totalInverse) const; + bool SK_WARN_UNUSED_RESULT computeTotalInverse(const SkMatrix& ctm, + const SkMatrix* outerLocalMatrix, + SkMatrix* totalInverse) const; + + // Returns the total local matrix for this shader: + // + // M = postLocalMatrix x shaderLocalMatrix x preLocalMatrix + // + SkTCopyOnFirstWrite<SkMatrix> totalLocalMatrix(const SkMatrix* preLocalMatrix, + const SkMatrix* postLocalMatrix = nullptr) const; #ifdef SK_SUPPORT_LEGACY_SHADER_ISABITMAP virtual bool onIsABitmap(SkBitmap*, SkMatrix*, TileMode[2]) const { |