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

Unified Diff: tools/viewer/sk_app/win/main_win.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/unix/main_unix.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/win/main_win.cpp
diff --git a/tools/viewer/sk_app/win/main_win.cpp b/tools/viewer/sk_app/win/main_win.cpp
index ba1629c8376939e869b0e4acbf366b9b1d3ec3eb..4800258973f576a8df7bd636cc6ac30d83ac6c43 100644
--- a/tools/viewer/sk_app/win/main_win.cpp
+++ b/tools/viewer/sk_app/win/main_win.cpp
@@ -27,8 +27,6 @@ static char* tchar_to_utf8(const TCHAR* str) {
#endif
}
-static double now_ms() { return SkTime::GetNSecs() * 1e-6; }
-
// This file can work with GUI or CONSOLE subsystem types since we define _tWinMain and main().
static int main_common(HINSTANCE hInstance, int show, int argc, char**argv);
@@ -66,18 +64,13 @@ static int main_common(HINSTANCE hInstance, int show, int argc, char**argv) {
MSG msg = { 0 };
- double currentTime = 0.0;
- double previousTime = 0.0;
-
// Main message loop
while (WM_QUIT != msg.message) {
if (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
} else {
- previousTime = currentTime;
- currentTime = now_ms();
- app->onIdle(currentTime - previousTime);
+ app->onIdle();
}
}
« no previous file with comments | « tools/viewer/sk_app/unix/main_unix.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698