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/sk_app/WindowContext.h" 17 18 #include <memory> 19 20 namespace sk_app { 21 22 struct DisplayParams; 23 24 namespace window_context_factory { 25 26 struct IOSWindowInfo { 27 sk_app::Window_ios* fWindow; 28 UIViewController* fViewController; 29 }; 30 31 #ifdef SK_VULKAN MakeVulkanForIOS(const IOSWindowInfo &,const DisplayParams &)32inline std::unique_ptr<WindowContext> MakeVulkanForIOS(const IOSWindowInfo&, const DisplayParams&) { 33 // No Vulkan support on iOS yet. 34 return nullptr; 35 } 36 #endif 37 38 #ifdef SK_METAL 39 std::unique_ptr<WindowContext> MakeMetalForIOS(const IOSWindowInfo&, const DisplayParams&); 40 #endif 41 42 #ifdef SK_GL 43 std::unique_ptr<WindowContext> MakeGLForIOS(const IOSWindowInfo&, const DisplayParams&); 44 std::unique_ptr<WindowContext> MakeRasterForIOS(const IOSWindowInfo&, const DisplayParams&); 45 #endif 46 47 } // namespace window_context_factory 48 49 } // namespace sk_app 50 51 #endif 52