7 #define GLFW_INCLUDE_NONE
8 #include "third_party/glfw/include/GLFW/glfw3.h"
10 #if IMPELLER_ENABLE_METAL
12 #endif // IMPELLER_ENABLE_METAL
14 #if IMPELLER_ENABLE_OPENGLES
16 #endif // IMPELLER_ENABLE_OPENGLES
18 #if IMPELLER_ENABLE_VULKAN
20 #endif // IMPELLER_ENABLE_VULKAN
28 #if IMPELLER_ENABLE_METAL
30 return std::make_unique<PlaygroundImplMTL>(switches);
31 #endif // IMPELLER_ENABLE_METAL
32 #if IMPELLER_ENABLE_OPENGLES
34 return std::make_unique<PlaygroundImplGLES>(switches);
35 #endif // IMPELLER_ENABLE_OPENGLES
36 #if IMPELLER_ENABLE_VULKAN
38 return std::make_unique<PlaygroundImplVK>(switches);
39 #endif // IMPELLER_ENABLE_VULKAN
41 FML_CHECK(
false) <<
"Attempted to create playground with backend that "
42 "isn't available or was disabled on this platform: "
49 : switches_(switches) {}
57 ::glfwGetWindowContentScale(window, &scale.
x, &scale.
y);