blob: 623b0d2557b9e03f78ad6f00bb82c9ea5a0fe833 [file] [log] [blame] [edit]
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/impeller/tools/impeller.gni")
import("//flutter/testing/testing.gni")
impeller_component("playground") {
sources = [
"playground.cc",
"playground.h",
"playground_impl.cc",
"playground_impl.h",
"widgets.cc",
"widgets.h",
]
deps = [ "../renderer/backend" ]
if (impeller_enable_metal) {
sources += [
"backend/metal/playground_impl_mtl.h",
"backend/metal/playground_impl_mtl.mm",
]
}
if (impeller_enable_opengles) {
sources += [
"backend/gles/playground_impl_gles.cc",
"backend/gles/playground_impl_gles.h",
]
}
if (impeller_enable_vulkan) {
sources += [
"backend/vulkan/playground_impl_vk.cc",
"backend/vulkan/playground_impl_vk.h",
]
}
public_deps = [
"../entity:entity_shaders",
"../entity:framebuffer_blend_entity_shaders",
"../entity:modern_entity_shaders",
"../fixtures:shader_fixtures",
"../renderer",
"../scene/shaders",
"imgui:imgui_impeller_backend",
"//flutter/fml",
"//third_party/glfw",
"//third_party/imgui:imgui_glfw",
]
if (impeller_enable_vulkan || impeller_enable_metal) {
public_deps += [ "../fixtures:shader_subgroup_fixtures" ]
}
public_configs = [ ":playground_config" ]
if (is_mac) {
frameworks = [
"AppKit.framework",
"QuartzCore.framework",
]
}
}
impeller_component("playground_test") {
testonly = true
sources = [
"compute_playground_test.cc",
"compute_playground_test.h",
"playground_test.cc",
"playground_test.h",
]
public_deps = [
":playground",
"//flutter/testing",
]
}
config("playground_config") {
if (impeller_enable_playground) {
defines = [ "IMPELLER_ENABLE_PLAYGROUND" ]
}
}