summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/LayerBase.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-08-30 19:24:04 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-30 19:24:04 -0700
commit3f41963ccb3af61b78d1e4fb0a07ca7d93be0feb (patch)
treed3b70d24fc5f9ec1c29fd8f7f1c501b6fff507ac /services/surfaceflinger/LayerBase.cpp
parentad0e6f9122cb910a17505bcd717e9a04e1eb789e (diff)
parent41b6aabf356d8a505da37b1d046bc9010028fe8b (diff)
downloadframeworks_native-3f41963ccb3af61b78d1e4fb0a07ca7d93be0feb.zip
frameworks_native-3f41963ccb3af61b78d1e4fb0a07ca7d93be0feb.tar.gz
frameworks_native-3f41963ccb3af61b78d1e4fb0a07ca7d93be0feb.tar.bz2
Merge "fix Surface positions are not floats"
Diffstat (limited to 'services/surfaceflinger/LayerBase.cpp')
-rw-r--r--services/surfaceflinger/LayerBase.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index 6a5c8e5..603fb60 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -45,7 +45,6 @@ LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display)
mFlinger(flinger), mFiltering(false),
mNeedsFiltering(false),
mOrientation(0),
- mLeft(0), mTop(0),
mTransactionFlags(0),
mPremultipliedAlpha(true), mName("unnamed"), mDebug(false),
mInvalidate(0)
@@ -119,7 +118,7 @@ uint32_t LayerBase::setTransactionFlags(uint32_t flags) {
return android_atomic_or(flags, &mTransactionFlags);
}
-bool LayerBase::setPosition(int32_t x, int32_t y) {
+bool LayerBase::setPosition(float x, float y) {
if (mCurrentState.transform.tx() == x && mCurrentState.transform.ty() == y)
return false;
mCurrentState.sequence++;
@@ -259,8 +258,6 @@ void LayerBase::validateVisibility(const Transform& planeTransform)
mOrientation = tr.getOrientation();
mTransform = tr;
mTransformedBounds = tr.makeBounds(w, h);
- mLeft = tr.tx();
- mTop = tr.ty();
}
void LayerBase::lockPageFlip(bool& recomputeVisibleRegions)
@@ -477,10 +474,10 @@ void LayerBase::dump(String8& result, char* buffer, size_t SIZE) const
snprintf(buffer, SIZE,
"+ %s %p\n"
" "
- "z=%9d, pos=(%4d,%4d), size=(%4d,%4d), "
+ "z=%9d, pos=(%g,%g), size=(%4d,%4d), "
"isOpaque=%1d, needsDithering=%1d, invalidate=%1d, "
"alpha=0x%02x, flags=0x%08x, tr=[%.2f, %.2f][%.2f, %.2f]\n",
- getTypeId(), this, s.z, tx(), ty(), s.w, s.h,
+ getTypeId(), this, s.z, s.transform.tx(), s.transform.ty(), s.w, s.h,
isOpaque(), needsDithering(), contentDirty,
s.alpha, s.flags,
s.transform[0][0], s.transform[0][1],