summaryrefslogtreecommitdiffstats
path: root/libs/gui
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-09-18 15:33:38 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-18 15:33:38 -0700
commita7e1660b257326f99261e7c9b2d58c9d2e68d0b0 (patch)
tree07651eea5afbd97a144d0558a0a54987fec6426c /libs/gui
parente803e6095e007563df939326fdd3ca5109619a42 (diff)
parentc1c05de415854eb7a13a16b7e22a22de8515123a (diff)
downloadframeworks_native-a7e1660b257326f99261e7c9b2d58c9d2e68d0b0.zip
frameworks_native-a7e1660b257326f99261e7c9b2d58c9d2e68d0b0.tar.gz
frameworks_native-a7e1660b257326f99261e7c9b2d58c9d2e68d0b0.tar.bz2
am c1c05de4: fix camera API 2.0 orientation
* commit 'c1c05de415854eb7a13a16b7e22a22de8515123a': fix camera API 2.0 orientation
Diffstat (limited to 'libs/gui')
-rw-r--r--libs/gui/BufferQueue.cpp3
-rw-r--r--libs/gui/IGraphicBufferConsumer.cpp8
2 files changed, 8 insertions, 3 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index 50e3079..87d66e2 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -557,7 +557,8 @@ status_t BufferQueue::queueBuffer(int buf,
item.mAcquireCalled = mSlots[buf].mAcquireCalled;
item.mGraphicBuffer = mSlots[buf].mGraphicBuffer;
item.mCrop = crop;
- item.mTransform = transform;
+ item.mTransform = transform & ~NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY;
+ item.mTransformToDisplayInverse = bool(transform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY);
item.mScalingMode = scalingMode;
item.mTimestamp = timestamp;
item.mIsAutoTimestamp = isAutoTimestamp;
diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp
index 4db635c..9574b61 100644
--- a/libs/gui/IGraphicBufferConsumer.cpp
+++ b/libs/gui/IGraphicBufferConsumer.cpp
@@ -47,7 +47,8 @@ IGraphicBufferConsumer::BufferItem::BufferItem() :
mFrameNumber(0),
mBuf(INVALID_BUFFER_SLOT),
mIsDroppable(false),
- mAcquireCalled(false) {
+ mAcquireCalled(false),
+ mTransformToDisplayInverse(false) {
mCrop.makeInvalid();
}
@@ -60,7 +61,8 @@ size_t IGraphicBufferConsumer::BufferItem::getPodSize() const {
sizeof(mFrameNumber) +
sizeof(mBuf) +
sizeof(mIsDroppable) +
- sizeof(mAcquireCalled);
+ sizeof(mAcquireCalled) +
+ sizeof(mTransformToDisplayInverse);
return c;
}
@@ -130,6 +132,7 @@ status_t IGraphicBufferConsumer::BufferItem::flatten(
FlattenableUtils::write(buffer, size, mBuf);
FlattenableUtils::write(buffer, size, mIsDroppable);
FlattenableUtils::write(buffer, size, mAcquireCalled);
+ FlattenableUtils::write(buffer, size, mTransformToDisplayInverse);
return NO_ERROR;
}
@@ -171,6 +174,7 @@ status_t IGraphicBufferConsumer::BufferItem::unflatten(
FlattenableUtils::read(buffer, size, mBuf);
FlattenableUtils::read(buffer, size, mIsDroppable);
FlattenableUtils::read(buffer, size, mAcquireCalled);
+ FlattenableUtils::read(buffer, size, mTransformToDisplayInverse);
return NO_ERROR;
}