Merge "frameworks/base: Swap width and height of temporary buffer only with orientation change"

This commit is contained in:
Jean-Baptiste Queru 2010-08-11 10:11:14 -07:00 committed by Android Code Review
commit b203a27f0e

View File

@ -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;
}