skia2/tools/sk_app/ios/WindowContextFactory_ios.h
Brian Osman 6848b716f7 Fix flicker when changing backend on iOS viewer
This is the same fix from: https://skia-review.googlesource.com/c/skia/+/107941

Change-Id: I1367b1fc466cecbc2733b4e337376ce9f48cb6d8
Reviewed-on: https://skia-review.googlesource.com/107980
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-02-16 15:31:36 +00:00

40 lines
792 B
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 "SDL.h"
namespace sk_app {
class WindowContext;
struct DisplayParams;
namespace window_context_factory {
struct IOSWindowInfo {
SDL_Window* fWindow;
SDL_GLContext fGLContext;
};
inline WindowContext* NewVulkanForIOS(const IOSWindowInfo&, const DisplayParams&) {
// No Vulkan support on iOS.
return nullptr;
}
WindowContext* NewGLForIOS(const IOSWindowInfo&, const DisplayParams&);
WindowContext* NewRasterForIOS(const IOSWindowInfo&, const DisplayParams&);
} // namespace window_context_factory
} // namespace sk_app
#endif