diff options
author | Jason Sams <rjsams@android.com> | 2010-07-28 14:15:09 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-28 14:15:09 -0700 |
commit | f96f73027d291e7251aab61c171931a87ba97926 (patch) | |
tree | 3fa3108f7bd91cb62ecdb139c76f3f1fbc0444e5 /src | |
parent | dee0589388ba0f6373912e18bf86243282fb3b9b (diff) | |
parent | 500d36e2ac95f6c5f34de5f0b6e6603464ee3940 (diff) | |
download | android_packages_apps_Trebuchet-f96f73027d291e7251aab61c171931a87ba97926.tar.gz android_packages_apps_Trebuchet-f96f73027d291e7251aab61c171931a87ba97926.tar.bz2 android_packages_apps_Trebuchet-f96f73027d291e7251aab61c171931a87ba97926.zip |
Merge "Cleanup setToClient calls."
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/allapps.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/android/launcher2/allapps.rs b/src/com/android/launcher2/allapps.rs index fad8907a7..0c55eeaed 100644 --- a/src/com/android/launcher2/allapps.rs +++ b/src/com/android/launcher2/allapps.rs @@ -52,7 +52,6 @@ static float g_PosVelocity = 0.f; static float g_LastPositionX = 0.f; static bool g_LastTouchDown = false; static float g_DT; -static int64_t g_LastTime; static int g_PosMax; static float g_Zoom = 0.f; static float g_Animation = 1.f; @@ -83,7 +82,7 @@ static void updateReadback() { i[0] = g_PosPage * (1 << 16); i[1] = g_PosVelocity * (1 << 16); i[2] = g_OldZoom * (1 << 16); - rsSendToClient(&i[0], 1, 12, 1); + rsSendToClientBlocking(1, &i[0], sizeof(i)); } } @@ -329,12 +328,8 @@ static void drawFrontGrid(float rowOffset, float p) int root() { // Compute dt in seconds. - int64_t newTime = rsUptimeMillis(); - g_DT = (newTime - g_LastTime) * 0.001f; - g_LastTime = newTime; - // physics may break if DT is large. - g_DT = min(g_DT, 0.1f); + g_DT = min(rsGetDt(), 0.1f); if (g_Zoom != gZoomTarget) { float dz = g_DT * 1.7f; |