Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: tools/viewer/sk_app/android/surface_glue_android.cpp

Issue 2129613002: More accurate render time and continuous fresh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ms argument of onIdle function Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/viewer/sk_app/android/main_android.cpp ('k') | tools/viewer/sk_app/unix/main_unix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/android/surface_glue_android.cpp
diff --git a/tools/viewer/sk_app/android/surface_glue_android.cpp b/tools/viewer/sk_app/android/surface_glue_android.cpp
index 0c1ab0cca24de1c593d9c3be8c04b58f7e3919d4..d001cd53677cb21ec6cacf85b4083efe3d3a7080 100644
--- a/tools/viewer/sk_app/android/surface_glue_android.cpp
+++ b/tools/viewer/sk_app/android/surface_glue_android.cpp
@@ -22,7 +22,6 @@
#include "SkTypes.h"
#include "SkUtils.h"
#include "Window_android.h"
-#include "SkTime.h"
namespace sk_app {
@@ -167,8 +166,6 @@ int SkiaAndroidApp::message_callback(int fd, int events, void* data) {
return 1; // continue receiving callbacks
}
-static double now_ms() { return SkTime::GetMSecs(); }
-
void* SkiaAndroidApp::pthread_main(void* arg) {
SkDebugf("pthread_main begins");
@@ -184,17 +181,13 @@ void* SkiaAndroidApp::pthread_main(void* arg) {
skiaAndroidApp->fApp = Application::Create(0, nullptr, skiaAndroidApp);
- double currentTime = 0.0;
- double previousTime = 0.0;
while (true) {
const int ident = ALooper_pollAll(0, nullptr, nullptr, nullptr);
if (ident >= 0) {
SkDebugf("Unhandled ALooper_pollAll ident=%d !", ident);
} else {
- previousTime = currentTime;
- currentTime = now_ms();
- skiaAndroidApp->fApp->onIdle(currentTime - previousTime);
+ skiaAndroidApp->fApp->onIdle();
}
}
« no previous file with comments | « tools/viewer/sk_app/android/main_android.cpp ('k') | tools/viewer/sk_app/unix/main_unix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698