diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 38682964a5ee9..00b5c8e2c2725 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -1124,6 +1124,16 @@ ORIGIN: ../../../flutter/impeller/core/platform.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/core/platform.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/core/range.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/core/range.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/resource_binder.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/resource_binder.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/runtime_types.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/runtime_types.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/sampler.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/sampler.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/sampler_descriptor.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/sampler_descriptor.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/shader_types.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/core/shader_types.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/core/texture.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/core/texture.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/core/texture_descriptor.cc + ../../../flutter/LICENSE @@ -1548,10 +1558,6 @@ ORIGIN: ../../../flutter/impeller/renderer/render_target.cc + ../../../flutter/L ORIGIN: ../../../flutter/impeller/renderer/render_target.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/renderer.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/renderer.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/renderer/sampler.cc + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/renderer/sampler.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/renderer/sampler_descriptor.cc + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/renderer/sampler_descriptor.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/sampler_library.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/sampler_library.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/shader_function.cc + ../../../flutter/LICENSE @@ -1560,8 +1566,6 @@ ORIGIN: ../../../flutter/impeller/renderer/shader_key.cc + ../../../flutter/LICE ORIGIN: ../../../flutter/impeller/renderer/shader_key.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/shader_library.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/shader_library.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/renderer/shader_types.cc + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/renderer/shader_types.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/snapshot.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/snapshot.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/stroke.comp + ../../../flutter/LICENSE @@ -1576,8 +1580,6 @@ ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage.fbs + ../../../flu ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_types.cc + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_types.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/scene/animation/animation.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/scene/animation/animation.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/scene/animation/animation_clip.cc + ../../../flutter/LICENSE @@ -3699,6 +3701,16 @@ FILE: ../../../flutter/impeller/core/platform.cc FILE: ../../../flutter/impeller/core/platform.h FILE: ../../../flutter/impeller/core/range.cc FILE: ../../../flutter/impeller/core/range.h +FILE: ../../../flutter/impeller/core/resource_binder.cc +FILE: ../../../flutter/impeller/core/resource_binder.h +FILE: ../../../flutter/impeller/core/runtime_types.cc +FILE: ../../../flutter/impeller/core/runtime_types.h +FILE: ../../../flutter/impeller/core/sampler.cc +FILE: ../../../flutter/impeller/core/sampler.h +FILE: ../../../flutter/impeller/core/sampler_descriptor.cc +FILE: ../../../flutter/impeller/core/sampler_descriptor.h +FILE: ../../../flutter/impeller/core/shader_types.cc +FILE: ../../../flutter/impeller/core/shader_types.h FILE: ../../../flutter/impeller/core/texture.cc FILE: ../../../flutter/impeller/core/texture.h FILE: ../../../flutter/impeller/core/texture_descriptor.cc @@ -4123,10 +4135,6 @@ FILE: ../../../flutter/impeller/renderer/render_target.cc FILE: ../../../flutter/impeller/renderer/render_target.h FILE: ../../../flutter/impeller/renderer/renderer.cc FILE: ../../../flutter/impeller/renderer/renderer.h -FILE: ../../../flutter/impeller/renderer/sampler.cc -FILE: ../../../flutter/impeller/renderer/sampler.h -FILE: ../../../flutter/impeller/renderer/sampler_descriptor.cc -FILE: ../../../flutter/impeller/renderer/sampler_descriptor.h FILE: ../../../flutter/impeller/renderer/sampler_library.cc FILE: ../../../flutter/impeller/renderer/sampler_library.h FILE: ../../../flutter/impeller/renderer/shader_function.cc @@ -4135,8 +4143,6 @@ FILE: ../../../flutter/impeller/renderer/shader_key.cc FILE: ../../../flutter/impeller/renderer/shader_key.h FILE: ../../../flutter/impeller/renderer/shader_library.cc FILE: ../../../flutter/impeller/renderer/shader_library.h -FILE: ../../../flutter/impeller/renderer/shader_types.cc -FILE: ../../../flutter/impeller/renderer/shader_types.h FILE: ../../../flutter/impeller/renderer/snapshot.cc FILE: ../../../flutter/impeller/renderer/snapshot.h FILE: ../../../flutter/impeller/renderer/stroke.comp @@ -4151,8 +4157,6 @@ FILE: ../../../flutter/impeller/runtime_stage/runtime_stage.fbs FILE: ../../../flutter/impeller/runtime_stage/runtime_stage.h FILE: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.cc FILE: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.h -FILE: ../../../flutter/impeller/runtime_stage/runtime_types.cc -FILE: ../../../flutter/impeller/runtime_stage/runtime_types.h FILE: ../../../flutter/impeller/scene/animation/animation.cc FILE: ../../../flutter/impeller/scene/animation/animation.h FILE: ../../../flutter/impeller/scene/animation/animation_clip.cc diff --git a/impeller/aiks/canvas.h b/impeller/aiks/canvas.h index 80b9c74dc9564..226ef14c8c576 100644 --- a/impeller/aiks/canvas.h +++ b/impeller/aiks/canvas.h @@ -13,13 +13,13 @@ #include "impeller/aiks/image.h" #include "impeller/aiks/paint.h" #include "impeller/aiks/picture.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/entity_pass.h" #include "impeller/entity/geometry.h" #include "impeller/geometry/matrix.h" #include "impeller/geometry/path.h" #include "impeller/geometry/point.h" #include "impeller/geometry/vector.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/typographer/glyph_atlas.h" #include "impeller/typographer/text_frame.h" diff --git a/impeller/compiler/code_gen_template.h b/impeller/compiler/code_gen_template.h index b7015b0457c7d..4bea4aa37c64d 100644 --- a/impeller/compiler/code_gen_template.h +++ b/impeller/compiler/code_gen_template.h @@ -18,13 +18,11 @@ constexpr std::string_view kReflectionHeaderTemplate = {# file itself and the no-check declarations will be stripped in generated files.#} #include "impeller/core/buffer_view.h" {# // nogncheck #} -#include "impeller/renderer/command.h" {# // nogncheck #} +#include "impeller/core/sampler.h" {# // nogncheck #} -#include "impeller/renderer/compute_command.h" {# // nogncheck #} +#include "impeller/core/shader_types.h" {# // nogncheck #} -#include "impeller/renderer/sampler.h" {# // nogncheck #} - -#include "impeller/renderer/shader_types.h" {# // nogncheck #} +#include "impeller/core/resource_binder.h" {# // nogncheck #} #include "impeller/core/texture.h" {# // nogncheck #} diff --git a/impeller/compiler/reflector.cc b/impeller/compiler/reflector.cc index bd1499df14a31..a65ccac6f58b0 100644 --- a/impeller/compiler/reflector.cc +++ b/impeller/compiler/reflector.cc @@ -86,21 +86,6 @@ static std::string ExecutionModelToString(spv::ExecutionModel model) { } } -static std::string ExecutionModelToCommandTypeName( - spv::ExecutionModel execution_model) { - switch (execution_model) { - case spv::ExecutionModel::ExecutionModelVertex: - case spv::ExecutionModel::ExecutionModelFragment: - case spv::ExecutionModel::ExecutionModelTessellationControl: - case spv::ExecutionModel::ExecutionModelTessellationEvaluation: - return "Command&"; - case spv::ExecutionModel::ExecutionModelGLCompute: - return "ComputeCommand&"; - default: - return "unsupported"; - } -} - static std::string StringToShaderStage(std::string str) { if (str == "vertex") { return "ShaderStage::kVertex"; @@ -1100,7 +1085,7 @@ std::vector Reflector::ReflectBindPrototypes( proto.docstring = stream.str(); } proto.args.push_back(BindPrototypeArgument{ - .type_name = ExecutionModelToCommandTypeName(execution_model), + .type_name = "ResourceBinder&", .argument_name = "command", }); proto.args.push_back(BindPrototypeArgument{ @@ -1119,7 +1104,7 @@ std::vector Reflector::ReflectBindPrototypes( proto.docstring = stream.str(); } proto.args.push_back(BindPrototypeArgument{ - .type_name = ExecutionModelToCommandTypeName(execution_model), + .type_name = "ResourceBinder&", .argument_name = "command", }); proto.args.push_back(BindPrototypeArgument{ @@ -1138,7 +1123,7 @@ std::vector Reflector::ReflectBindPrototypes( proto.docstring = stream.str(); } proto.args.push_back(BindPrototypeArgument{ - .type_name = ExecutionModelToCommandTypeName(execution_model), + .type_name = "ResourceBinder&", .argument_name = "command", }); proto.args.push_back(BindPrototypeArgument{ diff --git a/impeller/core/BUILD.gn b/impeller/core/BUILD.gn index 6b34c1326e5e4..68891ed145198 100644 --- a/impeller/core/BUILD.gn +++ b/impeller/core/BUILD.gn @@ -24,6 +24,16 @@ impeller_component("core") { "platform.h", "range.cc", "range.h", + "resource_binder.cc", + "resource_binder.h", + "runtime_types.cc", + "runtime_types.h", + "sampler.cc", + "sampler.h", + "sampler_descriptor.cc", + "sampler_descriptor.h", + "shader_types.cc", + "shader_types.h", "texture.cc", "texture.h", "texture_descriptor.cc", diff --git a/impeller/core/resource_binder.cc b/impeller/core/resource_binder.cc new file mode 100644 index 0000000000000..6972ec45591b7 --- /dev/null +++ b/impeller/core/resource_binder.cc @@ -0,0 +1,11 @@ +// 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. + +#include "impeller/core/resource_binder.h" + +namespace impeller { + +// + +} // namespace impeller diff --git a/impeller/core/resource_binder.h b/impeller/core/resource_binder.h new file mode 100644 index 0000000000000..4bea96f868f49 --- /dev/null +++ b/impeller/core/resource_binder.h @@ -0,0 +1,52 @@ +// 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. + +#pragma once + +#include +#include +#include +#include + +#include "flutter/fml/logging.h" +#include "flutter/fml/macros.h" +#include "impeller/core/buffer_view.h" +#include "impeller/core/formats.h" +#include "impeller/core/sampler.h" +#include "impeller/core/shader_types.h" +#include "impeller/core/texture.h" + +namespace impeller { + +//------------------------------------------------------------------------------ +/// @brief An interface for binding resources. This is implemented by +/// |Command| and |ComputeCommand| to make GPU resources available +/// to a given command's pipeline. +/// +struct ResourceBinder { + virtual ~ResourceBinder() = default; + + virtual bool BindResource(ShaderStage stage, + const ShaderUniformSlot& slot, + const ShaderMetadata& metadata, + const BufferView& view) = 0; + + virtual bool BindResource(ShaderStage stage, + const SampledImageSlot& slot, + const ShaderMetadata& metadata, + const std::shared_ptr& texture) = 0; + + virtual bool BindResource(ShaderStage stage, + const SampledImageSlot& slot, + const ShaderMetadata& metadata, + const std::shared_ptr& sampler) = 0; + + virtual bool BindResource(ShaderStage stage, + const SampledImageSlot& slot, + const ShaderMetadata& metadata, + const std::shared_ptr& texture, + const std::shared_ptr& sampler) = 0; +}; + +} // namespace impeller diff --git a/impeller/runtime_stage/runtime_types.cc b/impeller/core/runtime_types.cc similarity index 89% rename from impeller/runtime_stage/runtime_types.cc rename to impeller/core/runtime_types.cc index 4236eae89bbfc..0c530699ecda3 100644 --- a/impeller/runtime_stage/runtime_types.cc +++ b/impeller/core/runtime_types.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 "impeller/runtime_stage/runtime_types.h" +#include "impeller/core/runtime_types.h" namespace impeller { diff --git a/impeller/runtime_stage/runtime_types.h b/impeller/core/runtime_types.h similarity index 100% rename from impeller/runtime_stage/runtime_types.h rename to impeller/core/runtime_types.h diff --git a/impeller/renderer/sampler.cc b/impeller/core/sampler.cc similarity index 90% rename from impeller/renderer/sampler.cc rename to impeller/core/sampler.cc index 47d44e8996c3d..12b87d3e91b1a 100644 --- a/impeller/renderer/sampler.cc +++ b/impeller/core/sampler.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 "impeller/renderer/sampler.h" +#include "impeller/core/sampler.h" namespace impeller { diff --git a/impeller/renderer/sampler.h b/impeller/core/sampler.h similarity index 91% rename from impeller/renderer/sampler.h rename to impeller/core/sampler.h index 41a16f5b74865..3dd19cf71fed8 100644 --- a/impeller/renderer/sampler.h +++ b/impeller/core/sampler.h @@ -5,7 +5,7 @@ #pragma once #include "flutter/fml/macros.h" -#include "impeller/renderer/sampler_descriptor.h" +#include "impeller/core/sampler_descriptor.h" namespace impeller { diff --git a/impeller/renderer/sampler_descriptor.cc b/impeller/core/sampler_descriptor.cc similarity index 92% rename from impeller/renderer/sampler_descriptor.cc rename to impeller/core/sampler_descriptor.cc index b2e10cab10d49..9e99089813dd3 100644 --- a/impeller/renderer/sampler_descriptor.cc +++ b/impeller/core/sampler_descriptor.cc @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "impeller/renderer/sampler_descriptor.h" +#include "impeller/core/sampler_descriptor.h" + #include "fml/logging.h" namespace impeller { diff --git a/impeller/renderer/sampler_descriptor.h b/impeller/core/sampler_descriptor.h similarity index 100% rename from impeller/renderer/sampler_descriptor.h rename to impeller/core/sampler_descriptor.h diff --git a/impeller/renderer/shader_types.cc b/impeller/core/shader_types.cc similarity index 83% rename from impeller/renderer/shader_types.cc rename to impeller/core/shader_types.cc index f49b27cc45e68..8018c18eef0e6 100644 --- a/impeller/renderer/shader_types.cc +++ b/impeller/core/shader_types.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 "impeller/renderer/shader_types.h" +#include "impeller/core/shader_types.h" namespace impeller { diff --git a/impeller/renderer/shader_types.h b/impeller/core/shader_types.h similarity index 98% rename from impeller/renderer/shader_types.h rename to impeller/core/shader_types.h index 8767924b42271..ad7cddbb5104c 100644 --- a/impeller/renderer/shader_types.h +++ b/impeller/core/shader_types.h @@ -11,9 +11,9 @@ #include "flutter/fml/hash_combine.h" #include "flutter/fml/logging.h" +#include "impeller/core/runtime_types.h" #include "impeller/geometry/half.h" #include "impeller/geometry/matrix.h" -#include "impeller/runtime_stage/runtime_types.h" namespace impeller { diff --git a/impeller/display_list/nine_patch_converter.h b/impeller/display_list/nine_patch_converter.h index 6795f4dc7feb8..422a8943a0bd6 100644 --- a/impeller/display_list/nine_patch_converter.h +++ b/impeller/display_list/nine_patch_converter.h @@ -10,8 +10,8 @@ #include "impeller/aiks/canvas.h" #include "impeller/aiks/image.h" #include "impeller/aiks/paint.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/geometry/path.h" -#include "impeller/renderer/sampler_descriptor.h" namespace impeller { diff --git a/impeller/entity/contents/atlas_contents.h b/impeller/entity/contents/atlas_contents.h index 67fa20ef66fdf..44a31e12be215 100644 --- a/impeller/entity/contents/atlas_contents.h +++ b/impeller/entity/contents/atlas_contents.h @@ -9,9 +9,9 @@ #include #include "flutter/fml/macros.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/contents.h" #include "impeller/entity/entity.h" -#include "impeller/renderer/sampler_descriptor.h" namespace impeller { diff --git a/impeller/entity/contents/color_source_contents.cc b/impeller/entity/contents/color_source_contents.cc index 4eef31d6e9f9f..12918b3ac6d3c 100644 --- a/impeller/entity/contents/color_source_contents.cc +++ b/impeller/entity/contents/color_source_contents.cc @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "color_source_contents.h" +#include "impeller/entity/contents/color_source_contents.h" #include "impeller/entity/entity.h" #include "impeller/geometry/matrix.h" +#include "impeller/geometry/point.h" namespace impeller { diff --git a/impeller/entity/contents/contents.h b/impeller/entity/contents/contents.h index 1d444e57f7bb4..3d22803a6de26 100644 --- a/impeller/entity/contents/contents.h +++ b/impeller/entity/contents/contents.h @@ -9,10 +9,10 @@ #include #include "flutter/fml/macros.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/core/texture.h" #include "impeller/geometry/color.h" #include "impeller/geometry/rect.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/renderer/snapshot.h" namespace impeller { diff --git a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index e98af38f7edce..fb5e6ad498fcf 100644 --- a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -11,6 +11,7 @@ #include "impeller/base/strings.h" #include "impeller/base/validation.h" #include "impeller/core/formats.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/content_context.h" #include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/geometry/rect.h" @@ -18,7 +19,6 @@ #include "impeller/renderer/command_buffer.h" #include "impeller/renderer/render_pass.h" #include "impeller/renderer/render_target.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" namespace impeller { diff --git a/impeller/entity/contents/gradient_generator.h b/impeller/entity/contents/gradient_generator.h index 11cff7883da8e..24321d861218f 100644 --- a/impeller/entity/contents/gradient_generator.h +++ b/impeller/entity/contents/gradient_generator.h @@ -10,11 +10,11 @@ #include "flutter/fml/macros.h" #include "flutter/impeller/core/texture.h" +#include "impeller/core/shader_types.h" #include "impeller/geometry/color.h" #include "impeller/geometry/gradient.h" #include "impeller/geometry/path.h" #include "impeller/geometry/point.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/entity/contents/runtime_effect_contents.cc b/impeller/entity/contents/runtime_effect_contents.cc index 4b9f64d914e29..df9fa0547ce61 100644 --- a/impeller/entity/contents/runtime_effect_contents.cc +++ b/impeller/entity/contents/runtime_effect_contents.cc @@ -11,6 +11,7 @@ #include "flutter/fml/make_copyable.h" #include "impeller/base/validation.h" #include "impeller/core/formats.h" +#include "impeller/core/shader_types.h" #include "impeller/entity/contents/clip_contents.h" #include "impeller/entity/contents/content_context.h" #include "impeller/entity/runtime_effect.vert.h" @@ -18,7 +19,6 @@ #include "impeller/renderer/render_pass.h" #include "impeller/renderer/sampler_library.h" #include "impeller/renderer/shader_function.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/entity/contents/runtime_effect_contents.h b/impeller/entity/contents/runtime_effect_contents.h index a1baab42d6e34..0a85d5ae4bca9 100644 --- a/impeller/entity/contents/runtime_effect_contents.h +++ b/impeller/entity/contents/runtime_effect_contents.h @@ -6,8 +6,8 @@ #include #include +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/color_source_contents.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/runtime_stage/runtime_stage.h" namespace impeller { diff --git a/impeller/entity/contents/text_contents.cc b/impeller/entity/contents/text_contents.cc index e77ee50d76808..617d1a64ee6a2 100644 --- a/impeller/entity/contents/text_contents.cc +++ b/impeller/entity/contents/text_contents.cc @@ -9,11 +9,11 @@ #include #include "impeller/core/formats.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/content_context.h" #include "impeller/entity/entity.h" #include "impeller/geometry/path_builder.h" #include "impeller/renderer/render_pass.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" #include "impeller/tessellator/tessellator.h" #include "impeller/typographer/glyph_atlas.h" diff --git a/impeller/entity/contents/texture_contents.h b/impeller/entity/contents/texture_contents.h index 2dd485f5f1e5c..56600978e5ac2 100644 --- a/impeller/entity/contents/texture_contents.h +++ b/impeller/entity/contents/texture_contents.h @@ -9,9 +9,9 @@ #include #include "flutter/fml/macros.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/contents.h" #include "impeller/geometry/path.h" -#include "impeller/renderer/sampler_descriptor.h" namespace impeller { diff --git a/impeller/entity/contents/tiled_texture_contents.h b/impeller/entity/contents/tiled_texture_contents.h index 1b352c6771b12..32fbfaa0e4a10 100644 --- a/impeller/entity/contents/tiled_texture_contents.h +++ b/impeller/entity/contents/tiled_texture_contents.h @@ -9,12 +9,12 @@ #include #include "flutter/fml/macros.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/color_source_contents.h" #include "impeller/entity/contents/filters/color_filter_contents.h" #include "impeller/entity/entity.h" #include "impeller/geometry/path.h" #include "impeller/renderer/capabilities.h" -#include "impeller/renderer/sampler_descriptor.h" namespace impeller { diff --git a/impeller/entity/contents/vertices_contents.h b/impeller/entity/contents/vertices_contents.h index 88facd3b4b8bd..1ba524899cff4 100644 --- a/impeller/entity/contents/vertices_contents.h +++ b/impeller/entity/contents/vertices_contents.h @@ -9,13 +9,13 @@ #include #include "flutter/fml/macros.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/contents.h" #include "impeller/entity/entity.h" #include "impeller/entity/geometry.h" #include "impeller/geometry/color.h" #include "impeller/geometry/path.h" #include "impeller/geometry/point.h" -#include "impeller/renderer/sampler_descriptor.h" namespace impeller { diff --git a/impeller/entity/geometry.h b/impeller/entity/geometry.h index 5061dc19f7cb3..bcf9190766a32 100644 --- a/impeller/entity/geometry.h +++ b/impeller/entity/geometry.h @@ -12,6 +12,9 @@ #include "impeller/entity/solid_fill.vert.h" #include "impeller/geometry/color.h" #include "impeller/geometry/path.h" +#include "impeller/geometry/point.h" +#include "impeller/geometry/scalar.h" +#include "impeller/renderer/vertex_buffer_builder.h" namespace impeller { diff --git a/impeller/playground/imgui/imgui_impl_impeller.cc b/impeller/playground/imgui/imgui_impl_impeller.cc index e8c58325dbaae..1024e56c053ce 100644 --- a/impeller/playground/imgui/imgui_impl_impeller.cc +++ b/impeller/playground/imgui/imgui_impl_impeller.cc @@ -18,6 +18,7 @@ #include "impeller/core/allocator.h" #include "impeller/core/formats.h" #include "impeller/core/range.h" +#include "impeller/core/sampler.h" #include "impeller/core/texture.h" #include "impeller/core/texture_descriptor.h" #include "impeller/core/vertex_buffer.h" @@ -31,7 +32,6 @@ #include "impeller/renderer/pipeline_descriptor.h" #include "impeller/renderer/pipeline_library.h" #include "impeller/renderer/render_pass.h" -#include "impeller/renderer/sampler.h" #include "impeller/renderer/sampler_library.h" struct ImGui_ImplImpeller_Data { diff --git a/impeller/renderer/BUILD.gn b/impeller/renderer/BUILD.gn index e1f9c5532b8d8..3e1cc1a5de95d 100644 --- a/impeller/renderer/BUILD.gn +++ b/impeller/renderer/BUILD.gn @@ -78,10 +78,6 @@ impeller_component("renderer") { "render_target.h", "renderer.cc", "renderer.h", - "sampler.cc", - "sampler.h", - "sampler_descriptor.cc", - "sampler_descriptor.h", "sampler_library.cc", "sampler_library.h", "shader_function.cc", @@ -90,8 +86,6 @@ impeller_component("renderer") { "shader_key.h", "shader_library.cc", "shader_library.h", - "shader_types.cc", - "shader_types.h", "snapshot.cc", "snapshot.h", "surface.cc", diff --git a/impeller/renderer/backend/gles/capabilities_gles.h b/impeller/renderer/backend/gles/capabilities_gles.h index 5cce9125cac1c..edcfb99892c9c 100644 --- a/impeller/renderer/backend/gles/capabilities_gles.h +++ b/impeller/renderer/backend/gles/capabilities_gles.h @@ -7,8 +7,8 @@ #include #include "flutter/fml/macros.h" +#include "impeller/core/shader_types.h" #include "impeller/geometry/size.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/renderer/backend/gles/formats_gles.h b/impeller/renderer/backend/gles/formats_gles.h index ef4cc418a76c2..fa44297ba50e8 100644 --- a/impeller/renderer/backend/gles/formats_gles.h +++ b/impeller/renderer/backend/gles/formats_gles.h @@ -7,8 +7,8 @@ #include "flutter/fml/logging.h" #include "flutter/fml/macros.h" #include "impeller/core/formats.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/backend/gles/gles.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/renderer/backend/gles/sampler_gles.h b/impeller/renderer/backend/gles/sampler_gles.h index 7fa58daa45215..bb318f6a35278 100644 --- a/impeller/renderer/backend/gles/sampler_gles.h +++ b/impeller/renderer/backend/gles/sampler_gles.h @@ -6,7 +6,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" -#include "impeller/renderer/sampler.h" +#include "impeller/core/sampler.h" namespace impeller { diff --git a/impeller/renderer/backend/gles/sampler_library_gles.h b/impeller/renderer/backend/gles/sampler_library_gles.h index 9bf35d6740ec8..43794426d9ed5 100644 --- a/impeller/renderer/backend/gles/sampler_library_gles.h +++ b/impeller/renderer/backend/gles/sampler_library_gles.h @@ -5,7 +5,7 @@ #pragma once #include "flutter/fml/macros.h" -#include "impeller/renderer/sampler_descriptor.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" namespace impeller { diff --git a/impeller/renderer/backend/metal/blit_pass_mtl.mm b/impeller/renderer/backend/metal/blit_pass_mtl.mm index ddbba0772c219..b884d01c0c151 100644 --- a/impeller/renderer/backend/metal/blit_pass_mtl.mm +++ b/impeller/renderer/backend/metal/blit_pass_mtl.mm @@ -13,6 +13,7 @@ #include "impeller/base/backend_cast.h" #include "impeller/core/formats.h" #include "impeller/core/host_buffer.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/backend/metal/blit_command_mtl.h" #include "impeller/renderer/backend/metal/device_buffer_mtl.h" #include "impeller/renderer/backend/metal/formats_mtl.h" @@ -20,7 +21,6 @@ #include "impeller/renderer/backend/metal/sampler_mtl.h" #include "impeller/renderer/backend/metal/texture_mtl.h" #include "impeller/renderer/blit_command.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/renderer/backend/metal/compute_pass_mtl.mm b/impeller/renderer/backend/metal/compute_pass_mtl.mm index 204e2a2c886af..3a610acd154d4 100644 --- a/impeller/renderer/backend/metal/compute_pass_mtl.mm +++ b/impeller/renderer/backend/metal/compute_pass_mtl.mm @@ -15,13 +15,13 @@ #include "impeller/base/backend_cast.h" #include "impeller/core/formats.h" #include "impeller/core/host_buffer.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/backend/metal/compute_pipeline_mtl.h" #include "impeller/renderer/backend/metal/device_buffer_mtl.h" #include "impeller/renderer/backend/metal/formats_mtl.h" #include "impeller/renderer/backend/metal/sampler_mtl.h" #include "impeller/renderer/backend/metal/texture_mtl.h" #include "impeller/renderer/compute_command.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/renderer/backend/metal/context_mtl.h b/impeller/renderer/backend/metal/context_mtl.h index 21e7582e69511..b266b1c0d7102 100644 --- a/impeller/renderer/backend/metal/context_mtl.h +++ b/impeller/renderer/backend/metal/context_mtl.h @@ -11,6 +11,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" +#include "impeller/core/sampler.h" #include "impeller/renderer/backend/metal/allocator_mtl.h" #include "impeller/renderer/backend/metal/command_buffer_mtl.h" #include "impeller/renderer/backend/metal/gpu_tracer_mtl.h" @@ -18,7 +19,6 @@ #include "impeller/renderer/backend/metal/shader_library_mtl.h" #include "impeller/renderer/capabilities.h" #include "impeller/renderer/context.h" -#include "impeller/renderer/sampler.h" namespace impeller { diff --git a/impeller/renderer/backend/metal/context_mtl.mm b/impeller/renderer/backend/metal/context_mtl.mm index b57c210d9a9f0..fb1215ffdf22d 100644 --- a/impeller/renderer/backend/metal/context_mtl.mm +++ b/impeller/renderer/backend/metal/context_mtl.mm @@ -9,9 +9,9 @@ #include "flutter/fml/file.h" #include "flutter/fml/logging.h" #include "flutter/fml/paths.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/renderer/backend/metal/sampler_library_mtl.h" #include "impeller/renderer/capabilities.h" -#include "impeller/renderer/sampler_descriptor.h" namespace impeller { diff --git a/impeller/renderer/backend/metal/render_pass_mtl.mm b/impeller/renderer/backend/metal/render_pass_mtl.mm index 540309532ff26..4c912e9772935 100644 --- a/impeller/renderer/backend/metal/render_pass_mtl.mm +++ b/impeller/renderer/backend/metal/render_pass_mtl.mm @@ -10,12 +10,12 @@ #include "impeller/base/backend_cast.h" #include "impeller/core/formats.h" #include "impeller/core/host_buffer.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/backend/metal/device_buffer_mtl.h" #include "impeller/renderer/backend/metal/formats_mtl.h" #include "impeller/renderer/backend/metal/pipeline_mtl.h" #include "impeller/renderer/backend/metal/sampler_mtl.h" #include "impeller/renderer/backend/metal/texture_mtl.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/renderer/backend/metal/sampler_library_mtl.h b/impeller/renderer/backend/metal/sampler_library_mtl.h index 74297ebcb5320..d72cc11a0c3c7 100644 --- a/impeller/renderer/backend/metal/sampler_library_mtl.h +++ b/impeller/renderer/backend/metal/sampler_library_mtl.h @@ -11,7 +11,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" #include "impeller/base/comparable.h" -#include "impeller/renderer/sampler_descriptor.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" namespace impeller { diff --git a/impeller/renderer/backend/metal/sampler_mtl.h b/impeller/renderer/backend/metal/sampler_mtl.h index dc26deff68108..22f548e368729 100644 --- a/impeller/renderer/backend/metal/sampler_mtl.h +++ b/impeller/renderer/backend/metal/sampler_mtl.h @@ -8,7 +8,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" -#include "impeller/renderer/sampler.h" +#include "impeller/core/sampler.h" namespace impeller { diff --git a/impeller/renderer/backend/vulkan/formats_vk.h b/impeller/renderer/backend/vulkan/formats_vk.h index 16931d4132dbd..3b359332b29d3 100644 --- a/impeller/renderer/backend/vulkan/formats_vk.h +++ b/impeller/renderer/backend/vulkan/formats_vk.h @@ -6,8 +6,8 @@ #include "flutter/fml/macros.h" #include "impeller/core/formats.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/backend/vulkan/vk.h" -#include "impeller/renderer/shader_types.h" #include "vulkan/vulkan_enums.hpp" namespace impeller { diff --git a/impeller/renderer/backend/vulkan/render_pass_vk.cc b/impeller/renderer/backend/vulkan/render_pass_vk.cc index 8553aebd0c3f4..23adb1829ba33 100644 --- a/impeller/renderer/backend/vulkan/render_pass_vk.cc +++ b/impeller/renderer/backend/vulkan/render_pass_vk.cc @@ -13,6 +13,8 @@ #include "flutter/fml/trace_event.h" #include "impeller/base/validation.h" #include "impeller/core/formats.h" +#include "impeller/core/sampler.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/backend/vulkan/command_encoder_vk.h" #include "impeller/renderer/backend/vulkan/context_vk.h" #include "impeller/renderer/backend/vulkan/device_buffer_vk.h" @@ -21,8 +23,6 @@ #include "impeller/renderer/backend/vulkan/sampler_vk.h" #include "impeller/renderer/backend/vulkan/shared_object_vk.h" #include "impeller/renderer/backend/vulkan/texture_vk.h" -#include "impeller/renderer/sampler.h" -#include "impeller/renderer/shader_types.h" #include "vulkan/vulkan_enums.hpp" #include "vulkan/vulkan_structs.hpp" diff --git a/impeller/renderer/backend/vulkan/sampler_library_vk.h b/impeller/renderer/backend/vulkan/sampler_library_vk.h index 72129ca496757..8b5a4fca82fe3 100644 --- a/impeller/renderer/backend/vulkan/sampler_library_vk.h +++ b/impeller/renderer/backend/vulkan/sampler_library_vk.h @@ -7,8 +7,8 @@ #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" #include "impeller/base/comparable.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/renderer/backend/vulkan/vk.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" namespace impeller { diff --git a/impeller/renderer/backend/vulkan/sampler_vk.h b/impeller/renderer/backend/vulkan/sampler_vk.h index bf78d63a1b271..f67a64f9e83d6 100644 --- a/impeller/renderer/backend/vulkan/sampler_vk.h +++ b/impeller/renderer/backend/vulkan/sampler_vk.h @@ -6,9 +6,9 @@ #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" +#include "impeller/core/sampler.h" #include "impeller/renderer/backend/vulkan/shared_object_vk.h" #include "impeller/renderer/backend/vulkan/vk.h" -#include "impeller/renderer/sampler.h" #include "vulkan/vulkan_handles.hpp" namespace impeller { diff --git a/impeller/renderer/backend/vulkan/vertex_descriptor_vk.h b/impeller/renderer/backend/vulkan/vertex_descriptor_vk.h index 519dd2e7f3a03..31d3f447c7d61 100644 --- a/impeller/renderer/backend/vulkan/vertex_descriptor_vk.h +++ b/impeller/renderer/backend/vulkan/vertex_descriptor_vk.h @@ -5,8 +5,8 @@ #pragma once #include "flutter/fml/macros.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/backend/vulkan/vk.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/renderer/command.h b/impeller/renderer/command.h index aa219dfd5fc25..a75083ddc629f 100644 --- a/impeller/renderer/command.h +++ b/impeller/renderer/command.h @@ -13,12 +13,13 @@ #include "flutter/fml/macros.h" #include "impeller/core/buffer_view.h" #include "impeller/core/formats.h" +#include "impeller/core/resource_binder.h" +#include "impeller/core/sampler.h" +#include "impeller/core/shader_types.h" #include "impeller/core/texture.h" #include "impeller/core/vertex_buffer.h" #include "impeller/geometry/rect.h" #include "impeller/renderer/pipeline.h" -#include "impeller/renderer/sampler.h" -#include "impeller/renderer/shader_types.h" #include "impeller/renderer/vertex_buffer_builder.h" #include "impeller/tessellator/tessellator.h" @@ -63,7 +64,7 @@ struct Bindings { /// views into buffers managed by other allocators and resource /// managers. /// -struct Command { +struct Command : public ResourceBinder { //---------------------------------------------------------------------------- /// The pipeline to use for this command. /// @@ -145,26 +146,30 @@ struct Command { /// bool BindVertices(const VertexBuffer& buffer); + // |ResourceBinder| bool BindResource(ShaderStage stage, const ShaderUniformSlot& slot, const ShaderMetadata& metadata, - const BufferView& view); + const BufferView& view) override; + // |ResourceBinder| bool BindResource(ShaderStage stage, const SampledImageSlot& slot, const ShaderMetadata& metadata, - const std::shared_ptr& texture); + const std::shared_ptr& texture) override; + // |ResourceBinder| bool BindResource(ShaderStage stage, const SampledImageSlot& slot, const ShaderMetadata& metadata, - const std::shared_ptr& sampler); + const std::shared_ptr& sampler) override; + // |ResourceBinder| bool BindResource(ShaderStage stage, const SampledImageSlot& slot, const ShaderMetadata& metadata, const std::shared_ptr& texture, - const std::shared_ptr& sampler); + const std::shared_ptr& sampler) override; BufferView GetVertexBuffer() const; diff --git a/impeller/renderer/compute_command.h b/impeller/renderer/compute_command.h index 15ee42f98a5d8..467777d22deda 100644 --- a/impeller/renderer/compute_command.h +++ b/impeller/renderer/compute_command.h @@ -13,14 +13,15 @@ #include "flutter/fml/macros.h" #include "impeller/core/buffer_view.h" #include "impeller/core/formats.h" +#include "impeller/core/resource_binder.h" +#include "impeller/core/sampler.h" +#include "impeller/core/shader_types.h" #include "impeller/core/texture.h" #include "impeller/core/vertex_buffer.h" #include "impeller/geometry/rect.h" #include "impeller/renderer/command.h" #include "impeller/renderer/compute_pipeline_descriptor.h" #include "impeller/renderer/pipeline.h" -#include "impeller/renderer/sampler.h" -#include "impeller/renderer/shader_types.h" #include "impeller/renderer/vertex_buffer_builder.h" #include "impeller/tessellator/tessellator.h" @@ -39,7 +40,7 @@ namespace impeller { /// views into buffers managed by other allocators and resource /// managers. /// -struct ComputeCommand { +struct ComputeCommand : public ResourceBinder { //---------------------------------------------------------------------------- /// The pipeline to use for this command. /// @@ -54,26 +55,30 @@ struct ComputeCommand { /// std::string label; + // |ResourceBinder| bool BindResource(ShaderStage stage, const ShaderUniformSlot& slot, const ShaderMetadata& metadata, - const BufferView& view); + const BufferView& view) override; + // |ResourceBinder| bool BindResource(ShaderStage stage, const SampledImageSlot& slot, const ShaderMetadata& metadata, - const std::shared_ptr& texture); + const std::shared_ptr& texture) override; + // |ResourceBinder| bool BindResource(ShaderStage stage, const SampledImageSlot& slot, const ShaderMetadata& metadata, - const std::shared_ptr& sampler); + const std::shared_ptr& sampler) override; + // |ResourceBinder| bool BindResource(ShaderStage stage, const SampledImageSlot& slot, const ShaderMetadata& metadata, const std::shared_ptr& texture, - const std::shared_ptr& sampler); + const std::shared_ptr& sampler) override; constexpr operator bool() const { return pipeline && pipeline->IsValid(); } }; diff --git a/impeller/renderer/compute_pipeline_descriptor.h b/impeller/renderer/compute_pipeline_descriptor.h index 5bd513f43c863..9886d2691ddf8 100644 --- a/impeller/renderer/compute_pipeline_descriptor.h +++ b/impeller/renderer/compute_pipeline_descriptor.h @@ -17,7 +17,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/comparable.h" #include "impeller/core/formats.h" -#include "impeller/renderer/shader_types.h" +#include "impeller/core/shader_types.h" #include "impeller/tessellator/tessellator.h" namespace impeller { diff --git a/impeller/renderer/pipeline_descriptor.h b/impeller/renderer/pipeline_descriptor.h index 552fcfedf23c0..3d0eddf880e28 100644 --- a/impeller/renderer/pipeline_descriptor.h +++ b/impeller/renderer/pipeline_descriptor.h @@ -17,7 +17,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/comparable.h" #include "impeller/core/formats.h" -#include "impeller/renderer/shader_types.h" +#include "impeller/core/shader_types.h" #include "impeller/tessellator/tessellator.h" namespace impeller { diff --git a/impeller/renderer/renderer_unittests.cc b/impeller/renderer/renderer_unittests.cc index 9705fc7864043..e995aaea2cec4 100644 --- a/impeller/renderer/renderer_unittests.cc +++ b/impeller/renderer/renderer_unittests.cc @@ -6,6 +6,8 @@ #include "impeller/base/strings.h" #include "impeller/core/device_buffer_descriptor.h" #include "impeller/core/formats.h" +#include "impeller/core/sampler.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/fixtures/array.frag.h" #include "impeller/fixtures/array.vert.h" #include "impeller/fixtures/box_fade.frag.h" @@ -31,8 +33,6 @@ #include "impeller/renderer/pipeline_builder.h" #include "impeller/renderer/pipeline_library.h" #include "impeller/renderer/renderer.h" -#include "impeller/renderer/sampler.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" #include "impeller/renderer/surface.h" #include "impeller/renderer/vertex_buffer_builder.h" diff --git a/impeller/renderer/sampler_library.h b/impeller/renderer/sampler_library.h index e515b6facab36..777420776dc62 100644 --- a/impeller/renderer/sampler_library.h +++ b/impeller/renderer/sampler_library.h @@ -7,7 +7,7 @@ #include #include "flutter/fml/macros.h" -#include "impeller/renderer/sampler_descriptor.h" +#include "impeller/core/sampler_descriptor.h" namespace impeller { diff --git a/impeller/renderer/shader_function.h b/impeller/renderer/shader_function.h index 273b280f068b2..a271496e0762e 100644 --- a/impeller/renderer/shader_function.h +++ b/impeller/renderer/shader_function.h @@ -7,7 +7,7 @@ #include "flutter/fml/hash_combine.h" #include "flutter/fml/macros.h" #include "impeller/base/comparable.h" -#include "impeller/renderer/shader_types.h" +#include "impeller/core/shader_types.h" namespace impeller { diff --git a/impeller/renderer/shader_key.h b/impeller/renderer/shader_key.h index 24e7c0a455a72..802908647b149 100644 --- a/impeller/renderer/shader_key.h +++ b/impeller/renderer/shader_key.h @@ -10,7 +10,7 @@ #include "flutter/fml/hash_combine.h" #include "flutter/fml/macros.h" -#include "impeller/renderer/shader_types.h" +#include "impeller/core/shader_types.h" namespace impeller { diff --git a/impeller/renderer/shader_library.h b/impeller/renderer/shader_library.h index 3c1b4f9a730d3..76b1aeb8cd499 100644 --- a/impeller/renderer/shader_library.h +++ b/impeller/renderer/shader_library.h @@ -10,7 +10,7 @@ #include "flutter/fml/macros.h" #include "fml/mapping.h" -#include "impeller/renderer/shader_types.h" +#include "impeller/core/shader_types.h" namespace impeller { diff --git a/impeller/renderer/snapshot.h b/impeller/renderer/snapshot.h index 6d2d2fb74f085..0d9a57471aaaa 100644 --- a/impeller/renderer/snapshot.h +++ b/impeller/renderer/snapshot.h @@ -10,10 +10,10 @@ #include "flutter/fml/macros.h" #include "impeller/core/formats.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/core/texture.h" #include "impeller/geometry/matrix.h" #include "impeller/geometry/rect.h" -#include "impeller/renderer/sampler_descriptor.h" namespace impeller { diff --git a/impeller/renderer/vertex_descriptor.h b/impeller/renderer/vertex_descriptor.h index 8d145bb0f503e..19d9b9d1bfd9e 100644 --- a/impeller/renderer/vertex_descriptor.h +++ b/impeller/renderer/vertex_descriptor.h @@ -8,7 +8,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/comparable.h" -#include "impeller/renderer/shader_types.h" +#include "impeller/core/shader_types.h" namespace impeller { diff --git a/impeller/runtime_stage/BUILD.gn b/impeller/runtime_stage/BUILD.gn index 5756887562edb..f5768280d6d6b 100644 --- a/impeller/runtime_stage/BUILD.gn +++ b/impeller/runtime_stage/BUILD.gn @@ -20,12 +20,11 @@ impeller_component("runtime_stage") { sources = [ "runtime_stage.cc", "runtime_stage.h", - "runtime_types.cc", - "runtime_types.h", ] public_deps = [ ":runtime_stage_flatbuffers", "../base", + "../core", "//flutter/fml", ] } diff --git a/impeller/runtime_stage/runtime_stage.h b/impeller/runtime_stage/runtime_stage.h index 2c5eca0e3badd..f3a795c0caeb3 100644 --- a/impeller/runtime_stage/runtime_stage.h +++ b/impeller/runtime_stage/runtime_stage.h @@ -10,7 +10,7 @@ #include "flutter/fml/macros.h" #include "flutter/fml/mapping.h" -#include "flutter/impeller/runtime_stage/runtime_types.h" +#include "flutter/impeller/core/runtime_types.h" namespace impeller { diff --git a/impeller/runtime_stage/runtime_stage_playground.cc b/impeller/runtime_stage/runtime_stage_playground.cc index de0d3cf66f99e..3762581e85213 100644 --- a/impeller/runtime_stage/runtime_stage_playground.cc +++ b/impeller/runtime_stage/runtime_stage_playground.cc @@ -8,8 +8,8 @@ #include "flutter/fml/make_copyable.h" #include "flutter/testing/testing.h" +#include "impeller/core/shader_types.h" #include "impeller/renderer/shader_library.h" -#include "impeller/renderer/shader_types.h" namespace impeller { diff --git a/impeller/runtime_stage/runtime_stage_unittests.cc b/impeller/runtime_stage/runtime_stage_unittests.cc index d5596afa6748f..fbe4d5f447eee 100644 --- a/impeller/runtime_stage/runtime_stage_unittests.cc +++ b/impeller/runtime_stage/runtime_stage_unittests.cc @@ -9,11 +9,11 @@ #include "flutter/testing/testing.h" #include "impeller/base/allocation.h" #include "impeller/base/validation.h" +#include "impeller/core/shader_types.h" #include "impeller/playground/playground.h" #include "impeller/renderer/pipeline_descriptor.h" #include "impeller/renderer/pipeline_library.h" #include "impeller/renderer/shader_library.h" -#include "impeller/renderer/shader_types.h" #include "impeller/runtime_stage/runtime_stage.h" #include "impeller/runtime_stage/runtime_stage_playground.h" diff --git a/impeller/scene/geometry.cc b/impeller/scene/geometry.cc index 016211499aa95..4804377850a66 100644 --- a/impeller/scene/geometry.cc +++ b/impeller/scene/geometry.cc @@ -10,10 +10,10 @@ #include "impeller/core/device_buffer_descriptor.h" #include "impeller/core/formats.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/core/vertex_buffer.h" #include "impeller/geometry/point.h" #include "impeller/geometry/vector.h" -#include "impeller/renderer/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" #include "impeller/renderer/vertex_buffer_builder.h" #include "impeller/scene/importer/scene_flatbuffers.h" diff --git a/impeller/scene/material.cc b/impeller/scene/material.cc index 1e3493dadd3e5..d4f4c7161f3c8 100644 --- a/impeller/scene/material.cc +++ b/impeller/scene/material.cc @@ -5,7 +5,7 @@ #include "impeller/scene/material.h" #include "impeller/base/validation.h" #include "impeller/core/formats.h" -#include "impeller/renderer/sampler_descriptor.h" +#include "impeller/core/sampler_descriptor.h" #include "impeller/renderer/sampler_library.h" #include "impeller/scene/importer/conversions.h" #include "impeller/scene/importer/scene_flatbuffers.h"