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

Unified Diff: tools/viewer/sk_app/win/Window_win.cpp

Issue 2169543002: Use Windowing system-specific WindowContext factories. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: more xlib Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/viewer/sk_app/win/Window_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/win/Window_win.cpp
diff --git a/tools/viewer/sk_app/win/Window_win.cpp b/tools/viewer/sk_app/win/Window_win.cpp
index 03537caa45cac182304cecc01ffd97bce29e9681..e9905d42cced451cb57b867e7ab15dbcdf89742c 100644
--- a/tools/viewer/sk_app/win/Window_win.cpp
+++ b/tools/viewer/sk_app/win/Window_win.cpp
@@ -12,7 +12,7 @@
#include <windowsx.h>
#include "SkUtils.h"
-#include "../GLWindowContext.h"
+#include "WindowContextFactory_win.h"
#ifdef SK_VULKAN
#include "../VulkanWindowContext.h"
#endif
@@ -268,18 +268,14 @@ void Window_win::show() {
bool Window_win::attach(BackendType attachType, const DisplayParams& params) {
- ContextPlatformData_win platformData;
- platformData.fHInstance = fHInstance;
- platformData.fHWnd = fHWnd;
-
switch (attachType) {
case kNativeGL_BackendType:
default:
- fWindowContext = GLWindowContext::Create((void*)&platformData, params);
+ fWindowContext = window_context_factory::NewGLForWin(fHWnd, params);
break;
#ifdef SK_VULKAN
case kVulkan_BackendType:
- fWindowContext = VulkanWindowContext::Create((void*)&platformData, params);
+ fWindowContext = window_context_factory::NewVulkanForWin(fHWnd, params);
break;
#endif
}
« no previous file with comments | « tools/viewer/sk_app/win/Window_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698