Index: include/core/SkShader.h |
diff --git a/include/core/SkShader.h b/include/core/SkShader.h |
index 041730633a606fecdb60ed00636d2dbd3d1502fd..70854f48587c9cb79577d671ed982ccf23f93c5f 100644 |
--- a/include/core/SkShader.h |
+++ b/include/core/SkShader.h |
@@ -123,17 +123,17 @@ public: |
* ContextRec acts as a parameter bundle for creating Contexts. |
*/ |
struct ContextRec { |
- ContextRec() : fDevice(NULL), fPaint(NULL), fMatrix(NULL) {} |
- ContextRec(const ContextRec& other) |
- : fDevice(other.fDevice), fPaint(other.fPaint), fMatrix(other.fMatrix) {} |
+ ContextRec() : fDevice(NULL), fPaint(NULL), fMatrix(NULL), fLocalMatrix(NULL) {} |
ContextRec(const SkBitmap& device, const SkPaint& paint, const SkMatrix& matrix) |
: fDevice(&device) |
, fPaint(&paint) |
- , fMatrix(&matrix) {} |
+ , fMatrix(&matrix) |
+ , fLocalMatrix(NULL) {} |
const SkBitmap* fDevice; // the bitmap we are drawing into |
const SkPaint* fPaint; // the current paint associated with the draw |
const SkMatrix* fMatrix; // the current matrix in the canvas |
scroggo
2014/05/06 15:40:30
nit: spacing
reed1
2014/05/06 17:04:50
Done.
|
+ const SkMatrix* fLocalMatrix; // optional local matrix |
}; |
class Context : public ::SkNoncopyable { |
@@ -200,14 +200,15 @@ public: |
}; |
static MatrixClass ComputeMatrixClass(const SkMatrix&); |
- uint8_t getPaintAlpha() const { return fPaintAlpha; } |
- const SkMatrix& getTotalInverse() const { return fTotalInverse; } |
- MatrixClass getInverseClass() const { return (MatrixClass)fTotalInverseClass; } |
- |
+ uint8_t getPaintAlpha() const { return fPaintAlpha; } |
+ const SkMatrix& getTotalInverse() const { return fTotalInverse; } |
+ MatrixClass getInverseClass() const { return (MatrixClass)fTotalInverseClass; } |
+ const SkMatrix& getCTM() const { return fCTM; } |
private: |
- SkMatrix fTotalInverse; |
- uint8_t fPaintAlpha; |
- uint8_t fTotalInverseClass; |
+ SkMatrix fCTM; |
+ SkMatrix fTotalInverse; |
+ uint8_t fPaintAlpha; |
+ uint8_t fTotalInverseClass; |
typedef SkNoncopyable INHERITED; |
}; |