SurfaceFlinger: change the animation timeout
This change changes the animation transaction timeout from 500us to 5s. Bug: 7362633 Change-Id: I9bed8e74f726dae2daa398afc29babcea00d5b04
This commit is contained in:
parent
7f79a2bd5c
commit
7c41bf7092
@ -1664,6 +1664,7 @@ void SurfaceFlinger::setTransactionState(
|
|||||||
const Vector<DisplayState>& displays,
|
const Vector<DisplayState>& displays,
|
||||||
uint32_t flags)
|
uint32_t flags)
|
||||||
{
|
{
|
||||||
|
ATRACE_CALL();
|
||||||
Mutex::Autolock _l(mStateLock);
|
Mutex::Autolock _l(mStateLock);
|
||||||
uint32_t transactionFlags = 0;
|
uint32_t transactionFlags = 0;
|
||||||
|
|
||||||
@ -1671,11 +1672,12 @@ void SurfaceFlinger::setTransactionState(
|
|||||||
// For window updates that are part of an animation we must wait for
|
// For window updates that are part of an animation we must wait for
|
||||||
// previous animation "frames" to be handled.
|
// previous animation "frames" to be handled.
|
||||||
while (mAnimTransactionPending) {
|
while (mAnimTransactionPending) {
|
||||||
status_t err = mTransactionCV.waitRelative(mStateLock, 500 * 1000);
|
status_t err = mTransactionCV.waitRelative(mStateLock, s2ns(5));
|
||||||
if (CC_UNLIKELY(err != NO_ERROR)) {
|
if (CC_UNLIKELY(err != NO_ERROR)) {
|
||||||
// just in case something goes wrong in SF, return to the
|
// just in case something goes wrong in SF, return to the
|
||||||
// caller after a few hundred microseconds.
|
// caller after a few seconds.
|
||||||
ALOGW_IF(err == TIMED_OUT, "setTransactionState timed out!");
|
ALOGW_IF(err == TIMED_OUT, "setTransactionState timed out "
|
||||||
|
"waiting for previous animation frame");
|
||||||
mAnimTransactionPending = false;
|
mAnimTransactionPending = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user