summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/LayerBuffer.cpp
diff options
context:
space:
mode:
author Jean-Baptiste Queru <jbq@google.com> 2010-08-11 10:11:14 -0700
committer Android Code Review <code-review@android.com> 2010-08-11 10:11:14 -0700
commitb203a27f0efa2d0403e72bcefac25aee3c704ff0 (patch)
tree1bc1ee0a3014cd885b8316011ecf84a55d793a77 /services/surfaceflinger/LayerBuffer.cpp
parentcc15993db3ccf8e51b4b6e9a83cd63fef27c17f6 (diff)
parentad1c5cf963e85d2efe7b34c07e076dbf6b6ab7d0 (diff)
Merge "frameworks/base: Swap width and height of temporary buffer only with orientation change"
Diffstat (limited to 'services/surfaceflinger/LayerBuffer.cpp')
-rw-r--r--services/surfaceflinger/LayerBuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/LayerBuffer.cpp b/services/surfaceflinger/LayerBuffer.cpp
index 5c21593db2..0869283d27 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;
}