diff options
Diffstat (limited to 'libs/hwui')
| -rw-r--r-- | libs/hwui/DisplayList.cpp | 10 | ||||
| -rw-r--r-- | libs/hwui/DisplayList.h | 73 | ||||
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 2 |
3 files changed, 82 insertions, 3 deletions
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp index 8aac6288cf7b..6fab8dab11fd 100644 --- a/libs/hwui/DisplayList.cpp +++ b/libs/hwui/DisplayList.cpp @@ -263,6 +263,16 @@ void DisplayList::output(uint32_t level) { ALOGD("%*sDone (%p, %s)", level * 2, "", this, mName.string()); } +float DisplayList::getPivotX() { + updateMatrix(); + return mPivotX; +} + +float DisplayList::getPivotY() { + updateMatrix(); + return mPivotY; +} + void DisplayList::updateMatrix() { if (mMatrixDirty) { if (!mTransformMatrix) { diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h index d06827db07d4..86c9ec079c67 100644 --- a/libs/hwui/DisplayList.h +++ b/libs/hwui/DisplayList.h @@ -105,6 +105,10 @@ public: } } + const char* getName() const { + return mName.string(); + } + void setClipChildren(bool clipChildren) { mClipChildren = clipChildren; } @@ -114,6 +118,11 @@ public: mStaticMatrix = new SkMatrix(*matrix); } + // Can return NULL + SkMatrix* getStaticMatrix() { + return mStaticMatrix; + } + void setAnimationMatrix(SkMatrix* matrix) { delete mAnimationMatrix; if (matrix) { @@ -131,10 +140,18 @@ public: } } + float getAlpha() const { + return mAlpha; + } + void setHasOverlappingRendering(bool hasOverlappingRendering) { mHasOverlappingRendering = hasOverlappingRendering; } + bool hasOverlappingRendering() const { + return mHasOverlappingRendering; + } + void setTranslationX(float translationX) { if (translationX != mTranslationX) { mTranslationX = translationX; @@ -147,6 +164,10 @@ public: } } + float getTranslationX() const { + return mTranslationX; + } + void setTranslationY(float translationY) { if (translationY != mTranslationY) { mTranslationY = translationY; @@ -159,6 +180,10 @@ public: } } + float getTranslationY() const { + return mTranslationY; + } + void setRotation(float rotation) { if (rotation != mRotation) { mRotation = rotation; @@ -171,6 +196,10 @@ public: } } + float getRotation() const { + return mRotation; + } + void setRotationX(float rotationX) { if (rotationX != mRotationX) { mRotationX = rotationX; @@ -183,6 +212,10 @@ public: } } + float getRotationX() const { + return mRotationX; + } + void setRotationY(float rotationY) { if (rotationY != mRotationY) { mRotationY = rotationY; @@ -195,6 +228,10 @@ public: } } + float getRotationY() const { + return mRotationY; + } + void setScaleX(float scaleX) { if (scaleX != mScaleX) { mScaleX = scaleX; @@ -207,6 +244,10 @@ public: } } + float getScaleX() const { + return mScaleX; + } + void setScaleY(float scaleY) { if (scaleY != mScaleY) { mScaleY = scaleY; @@ -219,6 +260,10 @@ public: } } + float getScaleY() const { + return mScaleY; + } + void setPivotX(float pivotX) { mPivotX = pivotX; mMatrixDirty = true; @@ -230,6 +275,8 @@ public: mPivotExplicitlySet = true; } + ANDROID_API float getPivotX(); + void setPivotY(float pivotY) { mPivotY = pivotY; mMatrixDirty = true; @@ -241,6 +288,8 @@ public: mPivotExplicitlySet = true; } + ANDROID_API float getPivotY(); + void setCameraDistance(float distance) { if (distance != mCameraDistance) { mCameraDistance = distance; @@ -253,6 +302,10 @@ public: } } + float getCameraDistance() const { + return mCameraDistance; + } + void setLeft(int left) { if (left != mLeft) { mLeft = left; @@ -263,6 +316,10 @@ public: } } + float getLeft() const { + return mLeft; + } + void setTop(int top) { if (top != mTop) { mTop = top; @@ -273,6 +330,10 @@ public: } } + float getTop() const { + return mTop; + } + void setRight(int right) { if (right != mRight) { mRight = right; @@ -283,6 +344,10 @@ public: } } + float getRight() const { + return mRight; + } + void setBottom(int bottom) { if (bottom != mBottom) { mBottom = bottom; @@ -293,6 +358,10 @@ public: } } + float getBottom() const { + return mBottom; + } + void setLeftTop(int left, int top) { if (left != mLeft || top != mTop) { mLeft = left; @@ -319,7 +388,7 @@ public: } } - void offsetLeftRight(int offset) { + void offsetLeftRight(float offset) { if (offset != 0) { mLeft += offset; mRight += offset; @@ -329,7 +398,7 @@ public: } } - void offsetTopBottom(int offset) { + void offsetTopBottom(float offset) { if (offset != 0) { mTop += offset; mBottom += offset; diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index d11558f5aedf..e5fd7b9f0368 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -280,7 +280,7 @@ void OpenGLRenderer::startTiling(const sp<Snapshot>& s, bool opaque) { void OpenGLRenderer::startTiling(const Rect& clip, int windowHeight, bool opaque) { if (!mSuppressTiling) { mCaches.startTiling(clip.left, windowHeight - clip.bottom, - clip.right - clip.left, clip.bottom - clip.top, opaque); + clip.right - clip.left, clip.bottom - clip.top, opaque); } } |