| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 263 } |
| 264 | 264 |
| 265 void Window_win::show() { | 265 void Window_win::show() { |
| 266 ShowWindow(fHWnd, SW_SHOW); | 266 ShowWindow(fHWnd, SW_SHOW); |
| 267 } | 267 } |
| 268 | 268 |
| 269 | 269 |
| 270 bool Window_win::attach(BackendType attachType, const DisplayParams& params) { | 270 bool Window_win::attach(BackendType attachType, const DisplayParams& params) { |
| 271 switch (attachType) { | 271 switch (attachType) { |
| 272 case kNativeGL_BackendType: | 272 case kNativeGL_BackendType: |
| 273 default: | |
| 274 fWindowContext = window_context_factory::NewGLForWin(fHWnd, params); | 273 fWindowContext = window_context_factory::NewGLForWin(fHWnd, params); |
| 275 break; | 274 break; |
| 275 case kRaster_BackendType: |
| 276 fWindowContext = window_context_factory::NewRasterForWin(fHWnd, para
ms); |
| 277 break; |
| 276 #ifdef SK_VULKAN | 278 #ifdef SK_VULKAN |
| 277 case kVulkan_BackendType: | 279 case kVulkan_BackendType: |
| 278 fWindowContext = window_context_factory::NewVulkanForWin(fHWnd, para
ms); | 280 fWindowContext = window_context_factory::NewVulkanForWin(fHWnd, para
ms); |
| 279 break; | 281 break; |
| 280 #endif | 282 #endif |
| 281 } | 283 } |
| 282 | 284 |
| 283 return (SkToBool(fWindowContext)); | 285 return (SkToBool(fWindowContext)); |
| 284 } | 286 } |
| 285 | 287 |
| 286 void Window_win::onInval() { | 288 void Window_win::onInval() { |
| 287 InvalidateRect(fHWnd, nullptr, false); | 289 InvalidateRect(fHWnd, nullptr, false); |
| 288 } | 290 } |
| 289 | 291 |
| 290 } // namespace sk_app | 292 } // namespace sk_app |
| OLD | NEW |