From 24e249a4f6f6c8b540efd0f5922d82985548983b Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 9 Mar 2022 11:07:27 -0800 Subject: [PATCH] Fix top-level build group to not include the compiler and fixup headers. (#66) Targets in the engine had to individually depend on each sub-target in Impeller when all they cared about was all the client libs. The compiler is a build time implicit dependency. So that has been removed from the top-level group. Also fixed all the headers so that TUs within Impeller don't care about where Impeller itself sits in the source tree. --- impeller/BUILD.gn | 11 +---------- impeller/aiks/image.cc | 2 +- impeller/aiks/picture_recorder.cc | 4 ++-- impeller/base/validation.cc | 2 +- impeller/compiler/compiler.cc | 4 ++-- impeller/compiler/compiler.h | 4 ++-- impeller/compiler/compiler_unittests.cc | 2 +- impeller/compiler/impellerc_main.cc | 6 +++--- impeller/compiler/reflector.cc | 10 +++++----- impeller/compiler/switches.cc | 2 +- impeller/compiler/switches.h | 4 ++-- impeller/compiler/utilities.cc | 2 +- impeller/entity/contents/clip_contents.h | 2 +- impeller/entity/contents/content_context.h | 20 ++++++++++---------- impeller/playground/playground.mm | 4 ++-- impeller/renderer/renderer_unittests.cc | 10 +++++----- 16 files changed, 40 insertions(+), 49 deletions(-) diff --git a/impeller/BUILD.gn b/impeller/BUILD.gn index aa258109d90be..ff9e7be985f60 100644 --- a/impeller/BUILD.gn +++ b/impeller/BUILD.gn @@ -3,14 +3,9 @@ # found in the LICENSE file. config("impeller_public_config") { - include_dirs = [ - "..", - ".", - ] + include_dirs = [ ".." ] } -is_host = is_mac || is_linux || is_win - group("impeller") { public_deps = [ "aiks", @@ -24,10 +19,6 @@ group("impeller") { "tessellator", "typographer", ] - - if (is_host) { - public_deps += [ "compiler" ] - } } executable("impeller_unittests") { diff --git a/impeller/aiks/image.cc b/impeller/aiks/image.cc index 9e0c8fdf8fee6..342c4eee6a47d 100644 --- a/impeller/aiks/image.cc +++ b/impeller/aiks/image.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/aiks/image.h" +#include "impeller/aiks/image.h" namespace impeller { diff --git a/impeller/aiks/picture_recorder.cc b/impeller/aiks/picture_recorder.cc index c4040ca19e522..0d458468989db 100644 --- a/impeller/aiks/picture_recorder.cc +++ b/impeller/aiks/picture_recorder.cc @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/aiks/picture_recorder.h" +#include "impeller/aiks/picture_recorder.h" -#include "flutter/impeller/aiks/canvas.h" +#include "impeller/aiks/canvas.h" namespace impeller { diff --git a/impeller/base/validation.cc b/impeller/base/validation.cc index d0b113aee1244..1394cbc421874 100644 --- a/impeller/base/validation.cc +++ b/impeller/base/validation.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/base/validation.h" +#include "impeller/base/validation.h" #include "flutter/fml/logging.h" diff --git a/impeller/compiler/compiler.cc b/impeller/compiler/compiler.cc index f427aeba7b9c3..b6ac4b614d0f9 100644 --- a/impeller/compiler/compiler.cc +++ b/impeller/compiler/compiler.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/compiler/compiler.h" +#include "impeller/compiler/compiler.h" #include #include #include #include "flutter/fml/paths.h" -#include "flutter/impeller/compiler/logger.h" +#include "impeller/compiler/logger.h" namespace impeller { namespace compiler { diff --git a/impeller/compiler/compiler.h b/impeller/compiler/compiler.h index 689ec08183b87..9310bdc9bcf93 100644 --- a/impeller/compiler/compiler.h +++ b/impeller/compiler/compiler.h @@ -10,8 +10,8 @@ #include "flutter/fml/macros.h" #include "flutter/fml/mapping.h" -#include "flutter/impeller/compiler/include_dir.h" -#include "flutter/impeller/compiler/reflector.h" +#include "impeller/compiler/include_dir.h" +#include "impeller/compiler/reflector.h" #include "shaderc/shaderc.hpp" #include "third_party/spirv_cross/spirv_msl.hpp" #include "third_party/spirv_cross/spirv_parser.hpp" diff --git a/impeller/compiler/compiler_unittests.cc b/impeller/compiler/compiler_unittests.cc index f681d34281d33..eca4561887772 100644 --- a/impeller/compiler/compiler_unittests.cc +++ b/impeller/compiler/compiler_unittests.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/compiler/compiler.h" #include "flutter/testing/testing.h" #include "gtest/gtest.h" #include "impeller/base/validation.h" +#include "impeller/compiler/compiler.h" namespace impeller { namespace compiler { diff --git a/impeller/compiler/impellerc_main.cc b/impeller/compiler/impellerc_main.cc index de9f762238e1f..8dd49a9a25951 100644 --- a/impeller/compiler/impellerc_main.cc +++ b/impeller/compiler/impellerc_main.cc @@ -8,9 +8,9 @@ #include "flutter/fml/file.h" #include "flutter/fml/macros.h" #include "flutter/fml/mapping.h" -#include "flutter/impeller/compiler/compiler.h" -#include "flutter/impeller/compiler/switches.h" -#include "flutter/impeller/compiler/utilities.h" +#include "impeller/compiler/compiler.h" +#include "impeller/compiler/switches.h" +#include "impeller/compiler/utilities.h" #include "third_party/shaderc/libshaderc/include/shaderc/shaderc.hpp" namespace impeller { diff --git a/impeller/compiler/reflector.cc b/impeller/compiler/reflector.cc index b7f3f190e4627..b0f91d70e39ee 100644 --- a/impeller/compiler/reflector.cc +++ b/impeller/compiler/reflector.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/compiler/reflector.h" +#include "impeller/compiler/reflector.h" #include #include @@ -11,12 +11,12 @@ #include "flutter/fml/closure.h" #include "flutter/fml/logging.h" -#include "flutter/impeller/compiler/code_gen_template.h" -#include "flutter/impeller/compiler/utilities.h" -#include "flutter/impeller/geometry/matrix.h" -#include "flutter/impeller/geometry/scalar.h" #include "impeller/base/strings.h" #include "impeller/base/validation.h" +#include "impeller/compiler/code_gen_template.h" +#include "impeller/compiler/utilities.h" +#include "impeller/geometry/matrix.h" +#include "impeller/geometry/scalar.h" namespace impeller { namespace compiler { diff --git a/impeller/compiler/switches.cc b/impeller/compiler/switches.cc index 30f20a3006f8e..5ab2bf7453cdb 100644 --- a/impeller/compiler/switches.cc +++ b/impeller/compiler/switches.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/compiler/switches.h" +#include "impeller/compiler/switches.h" #include #include diff --git a/impeller/compiler/switches.h b/impeller/compiler/switches.h index 2380ca21521e6..3b7fac89d2e15 100644 --- a/impeller/compiler/switches.h +++ b/impeller/compiler/switches.h @@ -10,8 +10,8 @@ #include "flutter/fml/command_line.h" #include "flutter/fml/macros.h" #include "flutter/fml/unique_fd.h" -#include "flutter/impeller/compiler/compiler.h" -#include "flutter/impeller/compiler/include_dir.h" +#include "impeller/compiler/compiler.h" +#include "impeller/compiler/include_dir.h" namespace impeller { namespace compiler { diff --git a/impeller/compiler/utilities.cc b/impeller/compiler/utilities.cc index 3ba9ef533dd7e..78fa5df5e4703 100644 --- a/impeller/compiler/utilities.cc +++ b/impeller/compiler/utilities.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/compiler/utilities.h" +#include "impeller/compiler/utilities.h" #include #include diff --git a/impeller/entity/contents/clip_contents.h b/impeller/entity/contents/clip_contents.h index 41fe7cf4a53e2..1481873ae736b 100644 --- a/impeller/entity/contents/clip_contents.h +++ b/impeller/entity/contents/clip_contents.h @@ -10,7 +10,7 @@ #include "flutter/fml/macros.h" #include "impeller/entity/contents/contents.h" -#include "typographer/glyph_atlas.h" +#include "impeller/typographer/glyph_atlas.h" namespace impeller { diff --git a/impeller/entity/contents/content_context.h b/impeller/entity/contents/content_context.h index 0a3db38541c8e..45580647faa7d 100644 --- a/impeller/entity/contents/content_context.h +++ b/impeller/entity/contents/content_context.h @@ -9,17 +9,17 @@ #include "flutter/fml/hash_combine.h" #include "flutter/fml/macros.h" -#include "flutter/impeller/entity/glyph_atlas.frag.h" -#include "flutter/impeller/entity/glyph_atlas.vert.h" -#include "flutter/impeller/entity/gradient_fill.frag.h" -#include "flutter/impeller/entity/gradient_fill.vert.h" -#include "flutter/impeller/entity/solid_fill.frag.h" -#include "flutter/impeller/entity/solid_fill.vert.h" -#include "flutter/impeller/entity/solid_stroke.frag.h" -#include "flutter/impeller/entity/solid_stroke.vert.h" -#include "flutter/impeller/entity/texture_fill.frag.h" -#include "flutter/impeller/entity/texture_fill.vert.h" #include "impeller/entity/entity.h" +#include "impeller/entity/glyph_atlas.frag.h" +#include "impeller/entity/glyph_atlas.vert.h" +#include "impeller/entity/gradient_fill.frag.h" +#include "impeller/entity/gradient_fill.vert.h" +#include "impeller/entity/solid_fill.frag.h" +#include "impeller/entity/solid_fill.vert.h" +#include "impeller/entity/solid_stroke.frag.h" +#include "impeller/entity/solid_stroke.vert.h" +#include "impeller/entity/texture_fill.frag.h" +#include "impeller/entity/texture_fill.vert.h" #include "impeller/renderer/formats.h" namespace impeller { diff --git a/impeller/playground/playground.mm b/impeller/playground/playground.mm index be65b582ad6e5..9b13acc5e6683 100644 --- a/impeller/playground/playground.mm +++ b/impeller/playground/playground.mm @@ -5,10 +5,10 @@ #include #include "flutter/fml/paths.h" -#include "flutter/impeller/entity/entity_shaders.h" -#include "flutter/impeller/fixtures/shader_fixtures.h" #include "flutter/testing/testing.h" #include "impeller/base/validation.h" +#include "impeller/entity/entity_shaders.h" +#include "impeller/fixtures/shader_fixtures.h" #include "impeller/image/compressed_image.h" #include "impeller/playground/imgui/imgui_impl_impeller.h" #include "impeller/playground/imgui/imgui_shaders.h" diff --git a/impeller/renderer/renderer_unittests.cc b/impeller/renderer/renderer_unittests.cc index 01cc768328f40..d4a3482416380 100644 --- a/impeller/renderer/renderer_unittests.cc +++ b/impeller/renderer/renderer_unittests.cc @@ -3,11 +3,11 @@ // found in the LICENSE file. #include "flutter/fml/time/time_point.h" -#include "flutter/impeller/fixtures/box_fade.frag.h" -#include "flutter/impeller/fixtures/box_fade.vert.h" -#include "flutter/impeller/fixtures/test_texture.frag.h" -#include "flutter/impeller/fixtures/test_texture.vert.h" #include "flutter/testing/testing.h" +#include "impeller/fixtures/box_fade.frag.h" +#include "impeller/fixtures/box_fade.vert.h" +#include "impeller/fixtures/test_texture.frag.h" +#include "impeller/fixtures/test_texture.vert.h" #include "impeller/geometry/path_builder.h" #include "impeller/image/compressed_image.h" #include "impeller/image/decompressed_image.h" @@ -21,8 +21,8 @@ #include "impeller/renderer/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" #include "impeller/renderer/surface.h" -#include "impeller/tessellator/tessellator.h" #include "impeller/renderer/vertex_buffer_builder.h" +#include "impeller/tessellator/tessellator.h" namespace impeller { namespace testing {