diff options
author | Chet Haase <chet@google.com> | 2012-03-29 16:28:32 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2012-04-02 15:31:24 -0700 |
commit | 9420abd56a2af7ddbeb70562b79d61b2dca8c5a1 (patch) | |
tree | 8625a64e2d9ffd1520d890c2eb7989ccbef28adc /libs/hwui/DisplayListRenderer.h | |
parent | 1d6013357847983180a317e2acaf807bde8b7ea7 (diff) | |
download | frameworks_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.h | 21 |
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; }; |