OSDN Git Service

surfaceflinger: use Mutex timedLock instead of tryLock loop
authorJesse Hall <jessehall@google.com>
Tue, 23 Dec 2014 21:57:23 +0000 (13:57 -0800)
committerJesse Hall <jessehall@google.com>
Sat, 10 Jan 2015 23:41:01 +0000 (15:41 -0800)
commitfcd15b478c20f579388bb1368f05098dca534639
tree3efdd0440f567d9e62a231d21a659e721e16d100
parent033f7e8e35ac76404fe823a67e07ba7c42bc357c
surfaceflinger: use Mutex timedLock instead of tryLock loop

Rather than trying to acquire the state lock without waiting three
times at 1 second intervals in SurfaceFlinger::dump(), just try to
acquire the lock once with a 1 second timeout. Avoids spurious mutex
acquire failures that lead to flaky
com.android.cts.jank.opengl.CtsHostJankOpenGl results.

Bug: 18842510
Change-Id: I00ce6109647de2aef8831dd2f8fa98652ba7f4e0
services/surfaceflinger/SurfaceFlinger.cpp