blob: 797e4cc42d1597e2287d4f964ebb10cc4d7b5666 [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("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/impeller.gni")
import("//flutter/testing/testing.gni")
config("display_list_config") {
defines = []
if (impeller_enable_3d) {
defines += [ "IMPELLER_ENABLE_3D" ]
}
}
source_set("display_list") {
sources = [
"display_list.cc",
"display_list.h",
"display_list_attributes.h",
"display_list_blend_mode.cc",
"display_list_blend_mode.h",
"display_list_builder.cc",
"display_list_builder.h",
"display_list_color.h",
"display_list_color_filter.cc",
"display_list_color_filter.h",
"display_list_color_source.cc",
"display_list_color_source.h",
"display_list_complexity.cc",
"display_list_complexity.h",
"display_list_complexity_gl.cc",
"display_list_complexity_gl.h",
"display_list_complexity_metal.cc",
"display_list_complexity_metal.h",
"display_list_flags.cc",
"display_list_flags.h",
"display_list_image.cc",
"display_list_image.h",
"display_list_image_filter.cc",
"display_list_image_filter.h",
"display_list_image_skia.cc",
"display_list_image_skia.h",
"display_list_mask_filter.cc",
"display_list_mask_filter.h",
"display_list_matrix_clip_tracker.cc",
"display_list_matrix_clip_tracker.h",
"display_list_ops.cc",
"display_list_ops.h",
"display_list_paint.cc",
"display_list_paint.h",
"display_list_path_effect.cc",
"display_list_path_effect.h",
"display_list_rtree.cc",
"display_list_rtree.h",
"display_list_runtime_effect.cc",
"display_list_runtime_effect.h",
"display_list_sampling_options.h",
"display_list_tile_mode.h",
"display_list_utils.cc",
"display_list_utils.h",
"display_list_vertices.cc",
"display_list_vertices.h",
"dl_canvas.cc",
"dl_canvas.h",
"dl_op_receiver.cc",
"dl_op_receiver.h",
"skia/dl_sk_canvas.cc",
"skia/dl_sk_canvas.h",
"skia/dl_sk_conversions.cc",
"skia/dl_sk_conversions.h",
"skia/dl_sk_dispatcher.cc",
"skia/dl_sk_dispatcher.h",
"skia/dl_sk_utils.cc",
"skia/dl_sk_utils.h",
"types.h",
]
public_configs = [ ":display_list_config" ]
public_deps = [
"//flutter/fml",
"//flutter/impeller/runtime_stage",
"//third_party/skia",
]
if (!defined(defines)) {
defines = []
}
}
if (enable_unittests) {
test_fixtures("display_list_fixtures") {
fixtures = []
}
executable("display_list_unittests") {
testonly = true
sources = [
"display_list_color_filter_unittests.cc",
"display_list_color_source_unittests.cc",
"display_list_color_unittests.cc",
"display_list_complexity_unittests.cc",
"display_list_image_filter_unittests.cc",
"display_list_mask_filter_unittests.cc",
"display_list_matrix_clip_tracker_unittests.cc",
"display_list_paint_unittests.cc",
"display_list_path_effect_unittests.cc",
"display_list_rtree_unittests.cc",
"display_list_unittests.cc",
"display_list_vertices_unittests.cc",
"skia/dl_sk_conversions_unittests.cc",
"skia/dl_sk_utils_unittests.cc",
]
deps = [
":display_list",
":display_list_fixtures",
"//flutter/display_list/testing:display_list_testing",
"//flutter/testing",
]
if (!defined(defines)) {
defines = []
}
if (is_win) {
# Required for M_PI and others.
defines += [ "_USE_MATH_DEFINES" ]
}
# This is needed for //third_party/googletest for linking zircon symbols.
if (is_fuchsia) {
libs =
[ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
}
}
executable("display_list_rendertests") {
testonly = true
sources = [ "dl_rendering_unittests.cc" ]
deps = [
":display_list",
":display_list_fixtures",
"//flutter/display_list/testing:display_list_surface_provider",
"//flutter/display_list/testing:display_list_testing",
"//flutter/testing",
]
if (!defined(defines)) {
defines = []
}
if (is_win) {
# Required for M_PI and others.
defines += [ "_USE_MATH_DEFINES" ]
}
# This is needed for //third_party/googletest for linking zircon symbols.
if (is_fuchsia) {
libs =
[ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
}
}
executable("display_list_builder_benchmarks") {
testonly = true
sources = [ "display_list_builder_benchmarks.cc" ]
deps = [
":display_list",
":display_list_fixtures",
"//flutter/benchmarking",
"//flutter/display_list/testing:display_list_testing",
"//flutter/testing:testing_lib",
]
}
}
fixtures_location("display_list_benchmarks_fixtures") {
assets_dir = "$target_gen_dir/"
}
source_set("display_list_benchmarks_source") {
testonly = true
sources = [
"display_list_benchmarks.cc",
"display_list_benchmarks.h",
]
deps = [
":display_list",
":display_list_benchmarks_fixtures",
"//flutter/benchmarking",
"//flutter/common/graphics",
"//flutter/display_list/testing:display_list_surface_provider",
"//flutter/fml",
"//flutter/testing:skia",
"//flutter/testing:testing_lib",
"//third_party/dart/runtime:libdart_jit", # for tracing
"//third_party/skia",
]
}
executable("display_list_benchmarks") {
testonly = true
deps = [ ":display_list_benchmarks_source" ]
}
if (is_ios) {
shared_library("ios_display_list_benchmarks") {
testonly = true
visibility = [ ":*" ]
configs -= [
"//build/config/gcc:symbol_visibility_hidden",
"//build/config:symbol_visibility_hidden",
]
configs += [ "//flutter/benchmarking:benchmark_library_config" ]
cflags = [
"-fobjc-arc",
"-mios-simulator-version-min=$ios_testing_deployment_target",
]
ldflags =
[ "-Wl,-install_name,@rpath/libios_display_list_benchmarks.dylib" ]
deps = [
":display_list_benchmarks_source",
"//flutter/benchmarking:benchmarking_library",
]
}
}