blob: 25edcfa23bd8579ecaf1c911f67a8d4cb1d1a80c [file] [log] [blame]
# Copyright 2016 The Chromium 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_root/testing/testing.gni")
# Template to generate a dart embedder resource.cc file.
# Required invoker inputs:
# String output (name of output file)
# List inputs (list of input files to be included)
# String table_name (name of symbol for resource table)
# String root_prefix (base directory of resources)
# Optional invoker inputs:
# String input_directory (directory of resources that are recursively added)
# List deps
# List datadeps
template("dart_embedder_resources") {
action(target_name) {
script = "//third_party/dart/runtime/tools/create_resources.py"
deps = []
if (defined(invoker.deps)) {
deps += invoker.deps
}
datadeps = []
if (defined(invoker.datadeps)) {
datadeps = invoker.datadeps
}
output = invoker.output
outputs = [
output,
]
inputs = [ script ] + invoker.inputs
root_prefix = rebase_path(invoker.root_prefix)
args = [
"--output",
rebase_path(output),
"--outer_namespace",
"flutter",
"--inner_namespace",
"runtime",
"--table_name",
invoker.table_name,
"--root_prefix",
root_prefix,
]
if (defined(invoker.input_directory)) {
args += [
"--client_root",
rebase_path(invoker.input_directory),
]
}
args += rebase_path(invoker.inputs)
}
}
source_set("common") {
sources = [
"animator.cc",
"animator.h",
"engine.cc",
"engine.h",
"io_manager.cc",
"io_manager.h",
"isolate_configuration.cc",
"isolate_configuration.h",
"picture_serializer.cc",
"picture_serializer.h",
"platform_view.cc",
"platform_view.h",
"rasterizer.cc",
"rasterizer.h",
"run_configuration.cc",
"run_configuration.h",
"shell.cc",
"shell.h",
"skia_event_tracer_impl.cc",
"skia_event_tracer_impl.h",
"surface.cc",
"surface.h",
"switches.cc",
"switches.h",
"thread_host.cc",
"thread_host.h",
"vsync_waiter.cc",
"vsync_waiter.h",
"vsync_waiter_fallback.cc",
"vsync_waiter_fallback.h",
]
deps = [
"$flutter_root/assets",
"$flutter_root/common",
"$flutter_root/flow",
"$flutter_root/fml",
"$flutter_root/glue",
"$flutter_root/lib/ui",
"$flutter_root/runtime",
"$flutter_root/sky/engine/platform",
"$flutter_root/sky/engine/wtf",
"$flutter_root/synchronization",
"$flutter_root/third_party/txt",
"//garnet/public/lib/fxl",
"//third_party/dart/runtime:dart_api",
"//third_party/dart/runtime/platform:libdart_platform",
"//third_party/rapidjson",
"//third_party/skia",
"//third_party/skia:gpu",
]
public_deps = [
"//topaz/lib/tonic",
]
public_configs = [ "$flutter_root:config" ]
}
executable("shell_unittests") {
testonly = true
sources = [
"shell_unittests.cc",
]
deps = [
":common",
"$flutter_root/fml",
"$flutter_root/lib/snapshot",
"$flutter_root/testing",
"//garnet/public/lib/fxl",
"//third_party/dart/runtime:libdart_jit",
"//third_party/skia",
"//topaz/lib/tonic",
]
}