summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Chromium Automerger <chromium-automerger@android>2014-05-07 11:18:27 +0000
committerAndroid Chromium Automerger <chromium-automerger@android>2014-05-07 11:18:27 +0000
commit7b176c0d5d822759c0d1660c8f7d882d72d64643 (patch)
treebc7f117fd6a44db83a9f64d4632dcf9f77b00119
parent0b927f282c03b81323a41c7ef3558b93b435924f (diff)
parentc7557fbeb626b286d27a1b46b93da5a030df12b3 (diff)
downloadinclude-7b176c0d5d822759c0d1660c8f7d882d72d64643.tar.gz
Merge third_party/skia/include from https://chromium.googlesource.com/external/skia/include.git at c7557fbeb626b286d27a1b46b93da5a030df12b3
This commit was generated by merge_from_chromium.py. Change-Id: I3081cc5a45d49aefc4804c5c0a56e943ed5f9909
-rw-r--r--core/SkShader.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/core/SkShader.h b/core/SkShader.h
index 0417306..dc93b84 100644
--- a/core/SkShader.h
+++ b/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
+ 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
+ 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;
};