diff options
author | Omprakash Dhyade <odhyade@codeaurora.org> | 2010-08-05 16:28:37 -0700 |
---|---|---|
committer | Naomi Luis <nluis@codeaurora.org> | 2010-08-10 16:49:48 -0700 |
commit | 92bd90de145bb377d591217690d1fc096c19c047 (patch) | |
tree | 316d743dd420e6ba3eb77bfe5a1246e9fdc25332 | |
parent | 0f0dd448ea54ddb760ed77e7d9167b7d7ad1b916 (diff) | |
download | frameworks_base-92bd90de145bb377d591217690d1fc096c19c047.zip frameworks_base-92bd90de145bb377d591217690d1fc096c19c047.tar.gz frameworks_base-92bd90de145bb377d591217690d1fc096c19c047.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
-rw-r--r-- | services/surfaceflinger/LayerBuffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/LayerBuffer.cpp b/services/surfaceflinger/LayerBuffer.cpp index 5c21593..0869283 100644 --- a/services/surfaceflinger/LayerBuffer.cpp +++ b/services/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; } |