Set timeouts for SurfaceSyncGroup based on HW timeout

SurfaceSyncGroup is timing out on an emulator target. Use
ro.hw_timeout_multiplier to address this and other slow
target.

Test: presubmit
Bug: 273314551
Change-Id: I83dc352a24caabba2429ecf3f76c63500fa8a44d
This commit is contained in:
Vishnu Nair
2023-03-13 13:22:20 -07:00
parent 93ce6198ff
commit 9d28de67f3
2 changed files with 4 additions and 2 deletions

View File

@@ -11626,7 +11626,8 @@ public final class ViewRootImpl implements ViewParent,
mNumPausedForSync++;
mHandler.removeMessages(MSG_PAUSED_FOR_SYNC_TIMEOUT);
mHandler.sendEmptyMessageDelayed(MSG_PAUSED_FOR_SYNC_TIMEOUT, 1000);
mHandler.sendEmptyMessageDelayed(MSG_PAUSED_FOR_SYNC_TIMEOUT,
1000 * Build.HW_TIMEOUT_MULTIPLIER);
return mActiveSurfaceSyncGroup;
};

View File

@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.annotation.UiThread;
import android.os.Binder;
import android.os.BinderProxy;
import android.os.Build;
import android.os.Debug;
import android.os.Handler;
import android.os.HandlerThread;
@@ -62,7 +63,7 @@ public final class SurfaceSyncGroup {
private static final int MAX_COUNT = 100;
private static final AtomicInteger sCounter = new AtomicInteger(0);
private static final int TRANSACTION_READY_TIMEOUT = 1000;
private static final int TRANSACTION_READY_TIMEOUT = 1000 * Build.HW_TIMEOUT_MULTIPLIER;
private static Supplier<Transaction> sTransactionFactory = Transaction::new;