# 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") impeller_component("aiks") { sources = [ "aiks_context.cc", "aiks_context.h", "canvas.cc", "canvas.h", "color_filter.cc", "color_filter.h", "color_source.cc", "color_source.h", "experimental_canvas.cc", "experimental_canvas.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", ] public_deps = [ "../base", "../entity", "../geometry", ] deps = [ "//flutter/fml" ] } impeller_component("aiks_playground") { testonly = true sources = [ "aiks_playground.cc", "aiks_playground.h", ] deps = [ ":aiks", "../playground:playground_test", "//flutter/display_list", "//flutter/impeller/display_list:display_list", ] 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/entity:entity_test_helpers", "//flutter/impeller/renderer", "//flutter/testing:testing_lib", ] } template("aiks_unittests_component") { target_name = invoker.target_name predefined_sources = [ "aiks_blend_unittests.cc", "aiks_blur_unittests.cc", "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 } else { defines = [] } defines += [ "_USE_MATH_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_unittests.cc" ] } 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", ] }