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> |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 void Window_win::setTitle(const char* title) { | 258 void Window_win::setTitle(const char* title) { |
259 SetWindowTextA(fHWnd, title); | 259 SetWindowTextA(fHWnd, title); |
260 } | 260 } |
261 | 261 |
262 void Window_win::show() { | 262 void Window_win::show() { |
263 ShowWindow(fHWnd, SW_SHOW); | 263 ShowWindow(fHWnd, SW_SHOW); |
264 } | 264 } |
265 | 265 |
266 | 266 |
267 bool Window_win::attach(BackEndType attachType, int msaaSampleCount) { | 267 bool Window_win::attach(BackEndType attachType, const DisplayParams& params) { |
268 if (kVulkan_BackendType != attachType) { | 268 if (kVulkan_BackendType != attachType) { |
269 return false; | 269 return false; |
270 } | 270 } |
271 | 271 |
272 ContextPlatformData_win platformData; | 272 ContextPlatformData_win platformData; |
273 platformData.fHInstance = fHInstance; | 273 platformData.fHInstance = fHInstance; |
274 platformData.fHWnd = fHWnd; | 274 platformData.fHWnd = fHWnd; |
275 | 275 |
276 fWindowContext = VulkanWindowContext::Create((void*)&platformData, msaaSampl
eCount); | 276 fWindowContext = VulkanWindowContext::Create((void*)&platformData, params); |
277 | 277 |
278 return (SkToBool(fWindowContext)); | 278 return (SkToBool(fWindowContext)); |
279 } | 279 } |
280 | 280 |
281 void Window_win::inval() { | 281 void Window_win::inval() { |
282 InvalidateRect(fHWnd, nullptr, false); | 282 InvalidateRect(fHWnd, nullptr, false); |
283 } | 283 } |
284 | 284 |
285 } // namespace sk_app | 285 } // namespace sk_app |
OLD | NEW |