Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "Window_win.h" | 8 #include "Window_win.h" |
| 9 | 9 |
| 10 #include <tchar.h> | 10 #include <tchar.h> |
| 11 #include <windows.h> | 11 #include <windows.h> |
| 12 #include <windowsx.h> | 12 #include <windowsx.h> |
| 13 | 13 |
| 14 #include "Timer.h" | |
|
egdaniel
2016/04/07 17:03:16
What does this guy need timer.h added? Was it just
jvanverth1
2016/04/07 17:57:03
Done.
| |
| 14 #include "SkUtils.h" | 15 #include "SkUtils.h" |
| 15 #include "VulkanTestContext_win.h" | 16 #include "VulkanTestContext_win.h" |
| 16 | 17 |
| 17 Window* Window::CreateNativeWindow(void* platformData) { | 18 Window* Window::CreateNativeWindow(void* platformData) { |
| 18 HINSTANCE hInstance = (HINSTANCE)platformData; | 19 HINSTANCE hInstance = (HINSTANCE)platformData; |
| 19 | 20 |
| 20 Window_win* window = new Window_win(); | 21 Window_win* window = new Window_win(); |
| 21 if (!window->init(hInstance)) { | 22 if (!window->init(hInstance)) { |
| 22 delete window; | 23 delete window; |
| 23 return nullptr; | 24 return nullptr; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 | 256 |
| 256 void Window_win::setTitle(const char* title) { | 257 void Window_win::setTitle(const char* title) { |
| 257 SetWindowTextA(fHWnd, title); | 258 SetWindowTextA(fHWnd, title); |
| 258 } | 259 } |
| 259 | 260 |
| 260 void Window_win::show() { | 261 void Window_win::show() { |
| 261 ShowWindow(fHWnd, SW_SHOW); | 262 ShowWindow(fHWnd, SW_SHOW); |
| 262 } | 263 } |
| 263 | 264 |
| 264 | 265 |
| 265 bool Window_win::attach(BackEndTypes attachType, int msaaSampleCount, Attachment Info*) { | 266 bool Window_win::attach(BackEndType attachType, int msaaSampleCount, AttachmentI nfo*) { |
| 266 if (kVulkan_BackendType != attachType) { | 267 if (kVulkan_BackendType != attachType) { |
| 267 return false; | 268 return false; |
| 268 } | 269 } |
| 269 | 270 |
| 270 ContextPlatformData_win platformData; | 271 ContextPlatformData_win platformData; |
| 271 platformData.fHInstance = fHInstance; | 272 platformData.fHInstance = fHInstance; |
| 272 platformData.fHWnd = fHWnd; | 273 platformData.fHWnd = fHWnd; |
| 273 | 274 |
| 274 fTestContext = VulkanTestContext::Create((void*)&platformData, msaaSampleCou nt); | 275 fTestContext = VulkanTestContext::Create((void*)&platformData, msaaSampleCou nt); |
| 275 | 276 |
| 276 return (SkToBool(fTestContext)); | 277 return (SkToBool(fTestContext)); |
| 277 } | 278 } |
| OLD | NEW |