skia2/tools/sk_app/ios/WindowContextFactory_ios.h
Jim Van Verth 68cb8b0239 Switch to new IOS windowing system.
This replaces the SDL-based system and should allow Metal to work on iOS.
OpenGL and raster will render but there's no touch input yet.

Bug: skia:8737
Change-Id: I863accc47f0e1781192d567dbe54d1e321c3cd2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231561
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-08-29 20:13:03 +00:00

50 lines
1.1 KiB
Objective-C

/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef WindowContextFactory_ios_DEFINED
#define WindowContextFactory_ios_DEFINED
#include "tools/sk_app/ios/Window_ios.h"
#import <UIKit/UIKit.h>
#include "tools/sk_app/WindowContext.h"
#include <memory>
namespace sk_app {
struct DisplayParams;
namespace window_context_factory {
struct IOSWindowInfo {
sk_app::Window_ios* fWindow;
UIViewController* fViewController;
};
inline std::unique_ptr<WindowContext> MakeVulkanForIOS(const IOSWindowInfo&, const DisplayParams&) {
// No Vulkan support on iOS yet.
return nullptr;
}
inline std::unique_ptr<WindowContext> MakeMetalForIOS(const IOSWindowInfo&, const DisplayParams&) {
// No Metal support on iOS yet.
return nullptr;
}
std::unique_ptr<WindowContext> MakeGLForIOS(const IOSWindowInfo&, const DisplayParams&);
std::unique_ptr<WindowContext> MakeRasterForIOS(const IOSWindowInfo&, const DisplayParams&);
} // namespace window_context_factory
} // namespace sk_app
#endif