am 4cffbb47: Merge "fix [2946787] Screen flicker on low resolution setting in camcorder." into gingerbread
Merge commit '4cffbb47a28faa594c2217d1e84f9382e0b57cc4' into gingerbread-plus-aosp * commit '4cffbb47a28faa594c2217d1e84f9382e0b57cc4': fix [2946787] Screen flicker on low resolution setting in camcorder.
This commit is contained in:
@@ -162,9 +162,13 @@ status_t Layer::setBuffers( uint32_t w, uint32_t h,
|
|||||||
const uint32_t hwFlags = hw.getFlags();
|
const uint32_t hwFlags = hw.getFlags();
|
||||||
|
|
||||||
mFormat = format;
|
mFormat = format;
|
||||||
mReqFormat = format;
|
|
||||||
mWidth = w;
|
mWidth = w;
|
||||||
mHeight = h;
|
mHeight = h;
|
||||||
|
|
||||||
|
mReqFormat = format;
|
||||||
|
mReqWidth = w;
|
||||||
|
mReqHeight = h;
|
||||||
|
|
||||||
mSecure = (flags & ISurfaceComposer::eSecure) ? true : false;
|
mSecure = (flags & ISurfaceComposer::eSecure) ? true : false;
|
||||||
mNeedsBlending = (info.h_alpha - info.l_alpha) > 0;
|
mNeedsBlending = (info.h_alpha - info.l_alpha) > 0;
|
||||||
|
|
||||||
@@ -304,16 +308,22 @@ sp<GraphicBuffer> Layer::requestBuffer(int index,
|
|||||||
uint32_t w, h, f;
|
uint32_t w, h, f;
|
||||||
{ // scope for the lock
|
{ // scope for the lock
|
||||||
Mutex::Autolock _l(mLock);
|
Mutex::Autolock _l(mLock);
|
||||||
const bool fixedSizeChanged = mFixedSize != (reqWidth && reqHeight);
|
|
||||||
const bool formatChanged = mReqFormat != reqFormat;
|
// zero means default
|
||||||
mReqWidth = reqWidth;
|
if (!reqFormat) reqFormat = mFormat;
|
||||||
mReqHeight = reqHeight;
|
if (!reqWidth) reqWidth = mWidth;
|
||||||
mReqFormat = reqFormat;
|
if (!reqHeight) reqHeight = mHeight;
|
||||||
mFixedSize = reqWidth && reqHeight;
|
|
||||||
w = reqWidth ? reqWidth : mWidth;
|
w = reqWidth;
|
||||||
h = reqHeight ? reqHeight : mHeight;
|
h = reqHeight;
|
||||||
f = reqFormat ? reqFormat : mFormat;
|
f = reqFormat;
|
||||||
if (fixedSizeChanged || formatChanged) {
|
|
||||||
|
if ((reqWidth != mReqWidth) || (reqHeight != mReqHeight) ||
|
||||||
|
(reqFormat != mReqFormat)) {
|
||||||
|
mReqWidth = reqWidth;
|
||||||
|
mReqHeight = reqHeight;
|
||||||
|
mReqFormat = reqFormat;
|
||||||
|
|
||||||
lcblk->reallocateAllExcept(index);
|
lcblk->reallocateAllExcept(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user