blob: f1d7d8ef681ac70a239a70aef01eaebfc11678c2 [file] [log] [blame]
# 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("../tools/impeller.gni")
config("impeller_canvas_recorder_config") {
defines = [ "IMPELLER_TRACE_CANVAS" ]
}
impeller_component("aiks") {
sources = [
"aiks_context.cc",
"aiks_context.h",
"canvas.cc",
"canvas.h",
"canvas_recorder.h",
"canvas_type.h",
"color_filter.cc",
"color_filter.h",
"color_source.cc",
"color_source.h",
"image.cc",
"image.h",
"image_filter.cc",
"image_filter.h",
"paint.cc",
"paint.h",
"paint_pass_delegate.cc",
"paint_pass_delegate.h",
"picture.cc",
"picture.h",
"picture_recorder.cc",
"picture_recorder.h",
"trace_serializer.h",
]
public_deps = [
"../base",
"../entity",
"../geometry",
]
deps = [ "//flutter/fml" ]
if (impeller_trace_canvas) {
sources += [ "trace_serializer.cc" ]
public_configs = [ ":impeller_canvas_recorder_config" ]
}
}
impeller_component("aiks_playground") {
testonly = true
sources = [
"aiks_playground.cc",
"aiks_playground.h",
"aiks_playground_inspector.cc",
"aiks_playground_inspector.h",
]
deps = [
":aiks",
"../playground:playground_test",
]
public_deps = [
"//flutter/impeller/typographer/backends/skia:typographer_skia_backend",
]
}
impeller_component("context_spy") {
testonly = true
sources = [
"testing/context_mock.h",
"testing/context_spy.cc",
"testing/context_spy.h",
]
deps = [
"//flutter/impeller/renderer",
"//flutter/testing:testing_lib",
]
}
template("aiks_unittests_component") {
target_name = invoker.target_name
predefined_sources = [
"aiks_gradient_unittests.cc",
"aiks_path_unittests.cc",
"aiks_unittests.cc",
"aiks_unittests.h",
]
additional_sources = []
if (defined(invoker.sources)) {
additional_sources = invoker.sources
}
impeller_component(target_name) {
testonly = true
if (defined(invoker.defines)) {
defines = invoker.defines
}
sources = predefined_sources + additional_sources
deps = [
":aiks",
":aiks_playground",
":context_spy",
"//flutter/impeller/geometry:geometry_asserts",
"//flutter/impeller/golden_tests:golden_playground_test",
"//flutter/impeller/playground:playground_test",
"//flutter/impeller/scene",
"//flutter/impeller/typographer/backends/stb:typographer_stb_backend",
"//flutter/testing:testing_lib",
"//flutter/third_party/txt",
]
if (defined(invoker.public_configs)) {
public_configs = invoker.public_configs
}
}
}
aiks_unittests_component("aiks_unittests") {
sources = [
"canvas_recorder_unittests.cc",
"canvas_unittests.cc",
"trace_serializer_unittests.cc",
]
if (!impeller_trace_canvas) {
sources += [ "trace_serializer.cc" ]
public_configs = [ ":impeller_canvas_recorder_config" ]
}
}
aiks_unittests_component("aiks_unittests_golden") {
defines = [
"IMPELLER_GOLDEN_TESTS",
"IMPELLER_ENABLE_VALIDATION=1",
]
}
executable("canvas_benchmarks") {
testonly = true
sources = [ "canvas_benchmarks.cc" ]
deps = [
":aiks",
"//flutter/benchmarking",
]
}