OSDN Git Service

fix various issues in SF's EventThread
authorMathias Agopian <mathias@google.com>
Tue, 21 Aug 2012 03:07:34 +0000 (20:07 -0700)
committerThe Android Automerger <android-build@android.com>
Tue, 21 Aug 2012 19:40:17 +0000 (12:40 -0700)
commitbd589e324898ed77dff9cd3516d88ce4aca68352
tree91060e96729fac830b09da2994a7fb9cd5996218
parentd77d6acc2d491f9f394f4c5f0fa5c54202f67db1
fix various issues in SF's EventThread

- one issues caused most timestamps to be reported as 0
- on rare occasions an uninitialized variable could be used
- vsync counts per connection were accessed unthreadsafely

we now have 2 lists of connections in the main loop, one just
keeps a list of strong refs to the connections because once
we have a strong ref we're not allowed to release it while
holding the lock.

the 2nd list holds the connections that have a vsync event to
be reported. all the calculations are made with the lock held.

Change-Id: Iacfad3745b05df79d9ece3719bd4c34ddbfd5b83
services/surfaceflinger/EventThread.cpp
services/surfaceflinger/EventThread.h