diff options
author | 2012-02-17 16:59:50 -0800 | |
---|---|---|
committer | 2012-02-17 17:00:37 -0800 | |
commit | f7795e0c2faeea1d34f86ae03c2fcefd2209f522 (patch) | |
tree | d704fe2ca320133f1de0cb1243990030d6524637 | |
parent | fc2884ad9a6d61b25a2553941baa73f2f81ec762 (diff) |
Work around VSync signal while screen is off.
Change-Id: I0a9637170ee658ff84a363e91c558892dce5cfaf
-rw-r--r-- | libs/rs/rsContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index adaefc6017bf..95ac76e84fd9 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -263,6 +263,10 @@ void * Context::threadProc(void *vrsc) { rsc->timerSet(RS_TIMER_IDLE); #ifndef ANDROID_RS_SERIALIZE + if (!rsc->mRootScript.get() || !rsc->mHasSurface || rsc->mPaused) { + targetRate = 0; + } + if (vsyncRate != targetRate) { displayEvent.setVsyncRate(targetRate); vsyncRate = targetRate; |