summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListRenderer.h
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-03-29 16:28:32 -0700
committerChet Haase <chet@google.com>2012-04-02 15:31:24 -0700
commit9420abd56a2af7ddbeb70562b79d61b2dca8c5a1 (patch)
tree8625a64e2d9ffd1520d890c2eb7989ccbef28adc /libs/hwui/DisplayListRenderer.h
parent1d6013357847983180a317e2acaf807bde8b7ea7 (diff)
downloadframeworks_base-9420abd56a2af7ddbeb70562b79d61b2dca8c5a1.zip
frameworks_base-9420abd56a2af7ddbeb70562b79d61b2dca8c5a1.tar.gz
frameworks_base-9420abd56a2af7ddbeb70562b79d61b2dca8c5a1.tar.bz2
Re-enable DisplayList properties.
Re-enabling DisplayList properties last week caused some app errors due to the way that some transforms were being handled (specifically, those coming from the old Animations and ViewGroup's childStaticTransformation field). This change pushes *all* transform/alpha data from View.draw() into the view's DisplayList, making DisplayLists more encapsulated (and correct). Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
Diffstat (limited to 'libs/hwui/DisplayListRenderer.h')
-rw-r--r--libs/hwui/DisplayListRenderer.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index fff1d7c..a6108e1 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -156,14 +156,24 @@ public:
}
}
- void setApplicationScale(float scale) {
- mApplicationScale = scale;
- }
-
void setClipChildren(bool clipChildren) {
mClipChildren = clipChildren;
}
+ void setStaticMatrix(SkMatrix* matrix) {
+ delete mStaticMatrix;
+ mStaticMatrix = new SkMatrix(*matrix);
+ }
+
+ void setAnimationMatrix(SkMatrix* matrix) {
+ delete mAnimationMatrix;
+ if (matrix) {
+ mAnimationMatrix = new SkMatrix(*matrix);
+ } else {
+ mAnimationMatrix = NULL;
+ }
+ }
+
void setAlpha(float alpha) {
if (alpha != mAlpha) {
mAlpha = alpha;
@@ -483,7 +493,6 @@ private:
String8 mName;
// View properties
- float mApplicationScale;
bool mClipChildren;
float mAlpha;
int mMultipliedAlpha;
@@ -502,6 +511,8 @@ private:
SkMatrix* mTransformMatrix;
Sk3DView* mTransformCamera;
SkMatrix* mTransformMatrix3D;
+ SkMatrix* mStaticMatrix;
+ SkMatrix* mAnimationMatrix;
bool mCaching;
};