skia2/tools/sk_app/win/WindowContextFactory_win.h
Stephen White a800ec96f7 Dawn: implement sk_app window contexts for all backends.
Implement Window contexts for D3D12, Metal and Vulkan, as well as
a base class for all of them (DawnWindowContext).
Implement WSI, swap chains and external textures for all backends.
Add Dawn support to Viewer app.

Change-Id: I9368eae8d43594821aa1edd9fd559c8a9ba30066
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228060
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-08-02 19:51:02 +00:00

40 lines
851 B
C++

/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef WindowContextFactory_win_DEFINED
#define WindowContextFactory_win_DEFINED
#include <Windows.h>
#include <memory>
namespace sk_app {
class WindowContext;
struct DisplayParams;
namespace window_context_factory {
std::unique_ptr<WindowContext> MakeVulkanForWin(HWND, const DisplayParams&);
std::unique_ptr<WindowContext> MakeGLForWin(HWND, const DisplayParams&);
std::unique_ptr<WindowContext> MakeANGLEForWin(HWND, const DisplayParams&);
#ifdef SK_DAWN
std::unique_ptr<WindowContext> MakeDawnD3D12ForWin(HWND, const DisplayParams&);
#endif
std::unique_ptr<WindowContext> MakeRasterForWin(HWND, const DisplayParams&);
} // namespace window_context_factory
} // namespace sk_app
#endif