Debian Codegraph @

tools/window/ios/WindowContextFactory_ios.h

raw
1
2 /*
3 * Copyright 2017 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_ios_DEFINED
10 #define WindowContextFactory_ios_DEFINED
11
12 #include "tools/sk_app/ios/Window_ios.h"
13
14 #import <UIKit/UIKit.h>
15
16 #include "tools/window/WindowContext.h"
17
18 #include <memory>
19
20 namespace skwindow {
21
22 class DisplayParams;
23
24 struct IOSWindowInfo {
25 sk_app::Window_ios* fWindow;
26 UIViewController* fViewController;
27 };
28
29 #ifdef SK_VULKAN
30 inline std::unique_ptr<WindowContext> MakeVulkanForIOS(const IOSWindowInfo&,
31 std::unique_ptr<const DisplayParams>) {
32 // No Vulkan support on iOS yet.
33 return nullptr;
34 }
35 #endif
36
37 #ifdef SK_METAL
38 std::unique_ptr<WindowContext> MakeMetalForIOS(const IOSWindowInfo&,
39 std::unique_ptr<const DisplayParams>);
40 #if defined(SK_GRAPHITE)
41 std::unique_ptr<WindowContext> MakeGraphiteMetalForIOS(const IOSWindowInfo&,
42 std::unique_ptr<const DisplayParams>);
43 #endif
44 #endif
45
46 #ifdef SK_GL
47 std::unique_ptr<WindowContext> MakeGLForIOS(const IOSWindowInfo&,
48 std::unique_ptr<const DisplayParams>);
49 std::unique_ptr<WindowContext> MakeRasterForIOS(const IOSWindowInfo&,
50 std::unique_ptr<const DisplayParams>);
51 #endif
52
53 } // namespace skwindow
54
55 #endif