| 1 |
|
| 2 |
/* |
| 3 |
* Copyright 2016 Google Inc. |
| 4 |
* |
| 5 |
* Use of this source code is governed by a BSD-style license that can be |
| 6 |
* found in the LICENSE file. |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef WindowContextFactory_win_DEFINED |
| 10 |
#define WindowContextFactory_win_DEFINED |
| 11 |
|
| 12 |
#include "tools/sk_app/Window.h" |
| 13 |
|
| 14 |
#include <Windows.h> |
| 15 |
|
| 16 |
#include <memory> |
| 17 |
|
| 18 |
namespace skwindow { |
| 19 |
|
| 20 |
class WindowContext; |
| 21 |
class DisplayParams; |
| 22 |
|
| 23 |
#ifdef SK_VULKAN |
| 24 |
std::unique_ptr<WindowContext> MakeVulkanForWin(HWND, std::unique_ptr<const DisplayParams>); |
| 25 |
#if defined(SK_GRAPHITE) |
| 26 |
std::unique_ptr<WindowContext> MakeGraphiteVulkanForWin(HWND, std::unique_ptr<const DisplayParams>); |
| 27 |
#endif |
| 28 |
#endif |
| 29 |
|
| 30 |
#ifdef SK_GL |
| 31 |
std::unique_ptr<WindowContext> MakeGLForWin(HWND, std::unique_ptr<const DisplayParams>); |
| 32 |
#endif |
| 33 |
|
| 34 |
#ifdef SK_ANGLE |
| 35 |
std::unique_ptr<WindowContext> MakeANGLEForWin(HWND, std::unique_ptr<const DisplayParams>); |
| 36 |
#endif |
| 37 |
|
| 38 |
#ifdef SK_DIRECT3D |
| 39 |
std::unique_ptr<WindowContext> MakeD3D12ForWin(HWND, std::unique_ptr<const DisplayParams>); |
| 40 |
#endif |
| 41 |
|
| 42 |
#ifdef SK_DAWN |
| 43 |
#if defined(SK_GRAPHITE) |
| 44 |
std::unique_ptr<WindowContext> MakeGraphiteDawnForWin(HWND, |
| 45 |
std::unique_ptr<const DisplayParams>, |
| 46 |
sk_app::Window::BackendType backendType); |
| 47 |
#endif |
| 48 |
#endif |
| 49 |
|
| 50 |
std::unique_ptr<WindowContext> MakeRasterForWin(HWND, std::unique_ptr<const DisplayParams>); |
| 51 |
|
| 52 |
} // namespace skwindow |
| 53 |
|
| 54 |
#endif |