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

Side by Side Diff: tools/viewer/sk_app/win/Window_win.cpp

Issue 2182273002: SW backend for viewer on Windows (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 4 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/sk_app/win/WindowContextFactory_win.h ('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 "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
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
OLDNEW
« no previous file with comments | « tools/viewer/sk_app/win/WindowContextFactory_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698