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

Side by Side Diff: tools/vulkan/win/main_win.cpp

Issue 1873733003: More cleanup in the Vulkan viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « tools/vulkan/win/Window_win.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <tchar.h> 9 #include <tchar.h>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 MSG msg = { 0 }; 65 MSG msg = { 0 };
66 66
67 double currentTime = 0.0; 67 double currentTime = 0.0;
68 double previousTime = 0.0; 68 double previousTime = 0.0;
69 69
70 // Main message loop 70 // Main message loop
71 while (WM_QUIT != msg.message) { 71 while (WM_QUIT != msg.message) {
72 if (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { 72 if (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {
73 TranslateMessage(&msg); 73 TranslateMessage(&msg);
74 DispatchMessage(&msg); 74 DispatchMessage(&msg);
75 } 75 } else {
76 76 previousTime = currentTime;
77 previousTime = currentTime; 77 currentTime = now_ms();
78 currentTime = now_ms(); 78 app->onIdle(currentTime - previousTime);
79 app->onIdle(currentTime - previousTime); 79 }
80 } 80 }
81 81
82 delete app; 82 delete app;
83 83
84 return (int)msg.wParam; 84 return (int)msg.wParam;
85 } 85 }
OLDNEW
« no previous file with comments | « tools/vulkan/win/Window_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698