6 #include "flutter/testing/testing.h"
8 #define GLFW_INCLUDE_NONE
9 #include "third_party/glfw/include/GLFW/glfw3.h"
11 #if IMPELLER_ENABLE_METAL
13 #endif // IMPELLER_ENABLE_METAL
15 #if IMPELLER_ENABLE_OPENGLES
17 #endif // IMPELLER_ENABLE_OPENGLES
19 #if IMPELLER_ENABLE_VULKAN
21 #endif // IMPELLER_ENABLE_VULKAN
29 #if IMPELLER_ENABLE_METAL
31 return std::make_unique<PlaygroundImplMTL>(switches);
32 #endif // IMPELLER_ENABLE_METAL
33 #if IMPELLER_ENABLE_OPENGLES
35 return std::make_unique<PlaygroundImplGLES>(switches);
36 #endif // IMPELLER_ENABLE_OPENGLES
37 #if IMPELLER_ENABLE_VULKAN
40 FML_CHECK(
false) <<
"Attempted to create playground with backend that "
41 "isn't available or was disabled on this platform: "
45 return std::make_unique<PlaygroundImplVK>(switches);
46 #endif // IMPELLER_ENABLE_VULKAN
48 FML_CHECK(
false) <<
"Attempted to create playground with backend that "
49 "isn't available or was disabled on this platform: "
56 : switches_(switches) {}
64 ::glfwGetWindowContentScale(window, &
scale.x, &
scale.y);