summaryrefslogtreecommitdiffstats
path: root/libs/rs
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2012-02-17 17:20:27 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-17 17:20:27 -0800
commit6db0608dff408130b35e6f21abe746a635648b18 (patch)
tree642cc9f4d54803c58109d1b20fa68c24be2187b8 /libs/rs
parent9ffcbcc1f85f089ab480c9354d7dddb890340718 (diff)
parentf7795e0c2faeea1d34f86ae03c2fcefd2209f522 (diff)
downloadframeworks_base-6db0608dff408130b35e6f21abe746a635648b18.zip
frameworks_base-6db0608dff408130b35e6f21abe746a635648b18.tar.gz
frameworks_base-6db0608dff408130b35e6f21abe746a635648b18.tar.bz2
Merge "Work around VSync signal while screen is off."
Diffstat (limited to 'libs/rs')
-rw-r--r--libs/rs/rsContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index adaefc6..95ac76e 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;