Index: tools/viewer/sk_app/unix/Window_unix.cpp |
diff --git a/tools/viewer/sk_app/unix/Window_unix.cpp b/tools/viewer/sk_app/unix/Window_unix.cpp |
index c4729263eca9a144cc1419e815d45ebb5c0b6f3b..e6edfd9ef9b0cbcde91f2e2db7fd317f286d9b41 100644 |
--- a/tools/viewer/sk_app/unix/Window_unix.cpp |
+++ b/tools/viewer/sk_app/unix/Window_unix.cpp |
@@ -7,12 +7,11 @@ |
//#include <tchar.h> |
+#include "WindowContextFactory_unix.h" |
+ |
#include "SkUtils.h" |
#include "Timer.h" |
#include "../GLWindowContext.h" |
-#ifdef SK_VULKAN |
-#include "../VulkanWindowContext.h" |
-#endif |
#include "Window_unix.h" |
extern "C" { |
@@ -273,19 +272,19 @@ void Window_unix::show() { |
bool Window_unix::attach(BackendType attachType, const DisplayParams& params) { |
this->initWindow(fDisplay, ¶ms); |
- ContextPlatformData_unix platformData; |
- platformData.fDisplay = fDisplay; |
- platformData.fWindow = fWindow; |
- platformData.fVisualInfo = fVisualInfo; |
+ window_context_factory::XlibWindowInfo xwinInfo; |
+ xwinInfo.fDisplay = fDisplay; |
+ xwinInfo.fWindow = fWindow; |
+ xwinInfo.fVisualInfo = fVisualInfo; |
switch (attachType) { |
#ifdef SK_VULKAN |
case kVulkan_BackendType: |
- fWindowContext = VulkanWindowContext::Create((void*)&platformData, params); |
+ fWindowContext = window_context_factory::NewVulkanForXlib(xwinInfo, params); |
break; |
#endif |
case kNativeGL_BackendType: |
default: |
- fWindowContext = GLWindowContext::Create((void*)&platformData, params); |
+ fWindowContext = window_context_factory::NewGLForXlib(xwinInfo, params); |
break; |
} |