| 1 |
/* |
| 2 |
* Copyright 2023 Google LLC |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef WindowContextFactory_android_DEFINED |
| 9 |
#define WindowContextFactory_android_DEFINED |
| 10 |
|
| 11 |
#include <android/native_window_jni.h> |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
|
| 15 |
#include "tools/sk_app/Window.h" |
| 16 |
|
| 17 |
namespace skwindow { |
| 18 |
|
| 19 |
class WindowContext; |
| 20 |
class DisplayParams; |
| 21 |
|
| 22 |
std::unique_ptr<WindowContext> MakeVulkanForAndroid(ANativeWindow*, |
| 23 |
std::unique_ptr<const DisplayParams>); |
| 24 |
|
| 25 |
std::unique_ptr<WindowContext> MakeGraphiteVulkanForAndroid(ANativeWindow*, |
| 26 |
std::unique_ptr<const DisplayParams>); |
| 27 |
|
| 28 |
std::unique_ptr<WindowContext> MakeGraphiteDawnForAndroid(ANativeWindow*, |
| 29 |
std::unique_ptr<const DisplayParams>, |
| 30 |
sk_app::Window::BackendType backendType); |
| 31 |
|
| 32 |
std::unique_ptr<WindowContext> MakeGLForAndroid(ANativeWindow*, |
| 33 |
std::unique_ptr<const DisplayParams>); |
| 34 |
|
| 35 |
std::unique_ptr<WindowContext> MakeRasterForAndroid(ANativeWindow*, |
| 36 |
std::unique_ptr<const DisplayParams>); |
| 37 |
|
| 38 |
} // namespace skwindow |
| 39 |
|
| 40 |
#endif |