• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "SDL.h"
13 
14 #include "tools/sk_app/WindowContext.h"
15 
16 #include <memory>
17 
18 namespace sk_app {
19 
20 struct DisplayParams;
21 
22 namespace window_context_factory {
23 
24 struct IOSWindowInfo {
25     SDL_Window*   fWindow;
26     SDL_GLContext fGLContext;
27 };
28 
MakeVulkanForIOS(const IOSWindowInfo &,const DisplayParams &)29 inline std::unique_ptr<WindowContext> MakeVulkanForIOS(const IOSWindowInfo&, const DisplayParams&) {
30     // No Vulkan support on iOS.
31     return nullptr;
32 }
33 
34 std::unique_ptr<WindowContext> MakeGLForIOS(const IOSWindowInfo&, const DisplayParams&);
35 
36 std::unique_ptr<WindowContext> MakeRasterForIOS(const IOSWindowInfo&, const DisplayParams&);
37 
38 }  // namespace window_context_factory
39 
40 }  // namespace sk_app
41 
42 #endif
43