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

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

Issue 1945103003: Rename VulkanViewer to Viewer, take 2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix android path Created 4 years, 7 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/viewer/win/Window_win.cpp ('k') | tools/vulkan/Application.h » ('j') | 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
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 #include "Timer.h" 12 #include "Timer.h"
13 #include "Window_win.h" 13 #include "Window_win.h"
14 #include "../Application.h" 14 #include "../Application.h"
15 15
16 using sk_app::Application;
17
16 static char* tchar_to_utf8(const TCHAR* str) { 18 static char* tchar_to_utf8(const TCHAR* str) {
17 #ifdef _UNICODE 19 #ifdef _UNICODE
18 int size = WideCharToMultiByte(CP_UTF8, 0, str, wcslen(str), NULL, 0, NULL, NULL); 20 int size = WideCharToMultiByte(CP_UTF8, 0, str, wcslen(str), NULL, 0, NULL, NULL);
19 char* str8 = (char*)sk_malloc_throw(size + 1); 21 char* str8 = (char*)sk_malloc_throw(size + 1);
20 WideCharToMultiByte(CP_UTF8, 0, str, wcslen(str), str8, size, NULL, NULL); 22 WideCharToMultiByte(CP_UTF8, 0, str, wcslen(str), str8, size, NULL, NULL);
21 str8[size] = '\0'; 23 str8[size] = '\0';
22 return str8; 24 return str8;
23 #else 25 #else
24 return _strdup(str); 26 return _strdup(str);
25 #endif 27 #endif
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 previousTime = currentTime; 78 previousTime = currentTime;
77 currentTime = now_ms(); 79 currentTime = now_ms();
78 app->onIdle(currentTime - previousTime); 80 app->onIdle(currentTime - previousTime);
79 } 81 }
80 } 82 }
81 83
82 delete app; 84 delete app;
83 85
84 return (int)msg.wParam; 86 return (int)msg.wParam;
85 } 87 }
OLDNEW
« no previous file with comments | « tools/viewer/win/Window_win.cpp ('k') | tools/vulkan/Application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698