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
15 #if IMPELLER_ENABLE_OPENGLES
19 #if IMPELLER_ENABLE_VULKAN
29 #if IMPELLER_ENABLE_METAL
31 return std::make_unique<PlaygroundImplMTL>(switches);
33 #if IMPELLER_ENABLE_OPENGLES
35 return std::make_unique<PlaygroundImplGLES>(switches);
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);
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);
std::function< void *(void *instance, const char *proc_name)> VKProcAddressResolver
std::function< void *(const char *proc_name)> GLProcAddressResolver
PlaygroundImpl(PlaygroundSwitches switches)
virtual ~PlaygroundImpl()
Vector2 GetContentScale() const
virtual WindowHandle GetWindowHandle() const =0
static std::unique_ptr< PlaygroundImpl > Create(PlaygroundBackend backend, PlaygroundSwitches switches)
virtual Playground::GLProcAddressResolver CreateGLProcAddressResolver() const
virtual Playground::VKProcAddressResolver CreateVKProcAddressResolver() const
static bool IsVulkanDriverPresent()
std::string PlaygroundBackendToString(PlaygroundBackend backend)
bool enable_vulkan_validation