summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorOmprakash Dhyade <odhyade@codeaurora.org>2010-08-05 16:28:37 -0700
committerSteve Kondik <shade@chemlab.org>2010-08-16 17:20:24 -0400
commit0359278bc9b2a6df7a7a1b809a05adf9008690c3 (patch)
tree336852cd3ce914774a4dee2e1531a375b3e5e684 /libs
parent67dbf762bc8cd2c89403f2b476037426d1c651a1 (diff)
downloadframeworks_base-0359278bc9b2a6df7a7a1b809a05adf9008690c3.zip
frameworks_base-0359278bc9b2a6df7a7a1b809a05adf9008690c3.tar.gz
frameworks_base-0359278bc9b2a6df7a7a1b809a05adf9008690c3.tar.bz2
frameworks/base: Swap width and height of temporary buffer only with
orientation change Current code swaps the width and height by assuming that aspect ratio of the buffer width and height will be same as that of the layout clip width and height. That is not always true. Change the check to orientation change. Change-Id: Ie387f3a7369025427484e4173cbde7a08df2b9d7
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaceflinger/LayerBuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp
index 5c21593..0869283 100644
--- a/libs/surfaceflinger/LayerBuffer.cpp
+++ b/libs/surfaceflinger/LayerBuffer.cpp
@@ -540,7 +540,7 @@ status_t LayerBuffer::BufferSource::initTempBuffer() const
const ISurface::BufferHeap& buffers(mBufferHeap);
uint32_t w = mLayer.mTransformedBounds.width();
uint32_t h = mLayer.mTransformedBounds.height();
- if (buffers.w * h != buffers.h * w) {
+ if (mLayer.getOrientation() & (Transform::ROT_90 | Transform::ROT_270)) {
int t = w; w = h; h = t;
}