summaryrefslogtreecommitdiff
path: root/libs/hwui/Layer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Layer.h')
-rw-r--r--libs/hwui/Layer.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index e99e76299317..656a81783716 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -74,10 +74,18 @@ public:
void setColorFilter(sk_sp<SkColorFilter> filter) { mColorFilter = filter; };
- inline SkMatrix& getTexTransform() { return texTransform; }
-
inline SkMatrix& getTransform() { return transform; }
+ inline SkRect getCropRect() { return mCropRect; }
+
+ inline void setCropRect(const SkRect cropRect) { mCropRect = cropRect; }
+
+ inline void setTextureTransform(uint32_t textureTransform) {
+ mTextureTransform = textureTransform;
+ }
+
+ inline uint32_t getTextureTransform() { return mTextureTransform; }
+
/**
* Posts a decStrong call to the appropriate thread.
* Thread-safe.
@@ -116,14 +124,19 @@ private:
SkBlendMode mode;
/**
- * Optional texture coordinates transform.
+ * Optional transform.
*/
- SkMatrix texTransform;
+ SkMatrix transform;
/**
- * Optional transform.
+ * Optional crop
*/
- SkMatrix transform;
+ SkRect mCropRect;
+
+ /**
+ * Optional transform
+ */
+ uint32_t mTextureTransform;
/**
* An image backing the layer.