Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d34dddb

Browse files
authored
Revert "[Impeller] move everything needed by the code gen template to core (#40801)" (#40811)
This reverts commit 5e7e153.
1 parent a966c34 commit d34dddb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+113
-181
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,16 +1124,6 @@ ORIGIN: ../../../flutter/impeller/core/platform.cc + ../../../flutter/LICENSE
11241124
ORIGIN: ../../../flutter/impeller/core/platform.h + ../../../flutter/LICENSE
11251125
ORIGIN: ../../../flutter/impeller/core/range.cc + ../../../flutter/LICENSE
11261126
ORIGIN: ../../../flutter/impeller/core/range.h + ../../../flutter/LICENSE
1127-
ORIGIN: ../../../flutter/impeller/core/resource_binder.cc + ../../../flutter/LICENSE
1128-
ORIGIN: ../../../flutter/impeller/core/resource_binder.h + ../../../flutter/LICENSE
1129-
ORIGIN: ../../../flutter/impeller/core/runtime_types.cc + ../../../flutter/LICENSE
1130-
ORIGIN: ../../../flutter/impeller/core/runtime_types.h + ../../../flutter/LICENSE
1131-
ORIGIN: ../../../flutter/impeller/core/sampler.cc + ../../../flutter/LICENSE
1132-
ORIGIN: ../../../flutter/impeller/core/sampler.h + ../../../flutter/LICENSE
1133-
ORIGIN: ../../../flutter/impeller/core/sampler_descriptor.cc + ../../../flutter/LICENSE
1134-
ORIGIN: ../../../flutter/impeller/core/sampler_descriptor.h + ../../../flutter/LICENSE
1135-
ORIGIN: ../../../flutter/impeller/core/shader_types.cc + ../../../flutter/LICENSE
1136-
ORIGIN: ../../../flutter/impeller/core/shader_types.h + ../../../flutter/LICENSE
11371127
ORIGIN: ../../../flutter/impeller/core/texture.cc + ../../../flutter/LICENSE
11381128
ORIGIN: ../../../flutter/impeller/core/texture.h + ../../../flutter/LICENSE
11391129
ORIGIN: ../../../flutter/impeller/core/texture_descriptor.cc + ../../../flutter/LICENSE
@@ -1558,6 +1548,10 @@ ORIGIN: ../../../flutter/impeller/renderer/render_target.cc + ../../../flutter/L
15581548
ORIGIN: ../../../flutter/impeller/renderer/render_target.h + ../../../flutter/LICENSE
15591549
ORIGIN: ../../../flutter/impeller/renderer/renderer.cc + ../../../flutter/LICENSE
15601550
ORIGIN: ../../../flutter/impeller/renderer/renderer.h + ../../../flutter/LICENSE
1551+
ORIGIN: ../../../flutter/impeller/renderer/sampler.cc + ../../../flutter/LICENSE
1552+
ORIGIN: ../../../flutter/impeller/renderer/sampler.h + ../../../flutter/LICENSE
1553+
ORIGIN: ../../../flutter/impeller/renderer/sampler_descriptor.cc + ../../../flutter/LICENSE
1554+
ORIGIN: ../../../flutter/impeller/renderer/sampler_descriptor.h + ../../../flutter/LICENSE
15611555
ORIGIN: ../../../flutter/impeller/renderer/sampler_library.cc + ../../../flutter/LICENSE
15621556
ORIGIN: ../../../flutter/impeller/renderer/sampler_library.h + ../../../flutter/LICENSE
15631557
ORIGIN: ../../../flutter/impeller/renderer/shader_function.cc + ../../../flutter/LICENSE
@@ -1566,6 +1560,8 @@ ORIGIN: ../../../flutter/impeller/renderer/shader_key.cc + ../../../flutter/LICE
15661560
ORIGIN: ../../../flutter/impeller/renderer/shader_key.h + ../../../flutter/LICENSE
15671561
ORIGIN: ../../../flutter/impeller/renderer/shader_library.cc + ../../../flutter/LICENSE
15681562
ORIGIN: ../../../flutter/impeller/renderer/shader_library.h + ../../../flutter/LICENSE
1563+
ORIGIN: ../../../flutter/impeller/renderer/shader_types.cc + ../../../flutter/LICENSE
1564+
ORIGIN: ../../../flutter/impeller/renderer/shader_types.h + ../../../flutter/LICENSE
15691565
ORIGIN: ../../../flutter/impeller/renderer/snapshot.cc + ../../../flutter/LICENSE
15701566
ORIGIN: ../../../flutter/impeller/renderer/snapshot.h + ../../../flutter/LICENSE
15711567
ORIGIN: ../../../flutter/impeller/renderer/stroke.comp + ../../../flutter/LICENSE
@@ -1580,6 +1576,8 @@ ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage.fbs + ../../../flu
15801576
ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage.h + ../../../flutter/LICENSE
15811577
ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.cc + ../../../flutter/LICENSE
15821578
ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.h + ../../../flutter/LICENSE
1579+
ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_types.cc + ../../../flutter/LICENSE
1580+
ORIGIN: ../../../flutter/impeller/runtime_stage/runtime_types.h + ../../../flutter/LICENSE
15831581
ORIGIN: ../../../flutter/impeller/scene/animation/animation.cc + ../../../flutter/LICENSE
15841582
ORIGIN: ../../../flutter/impeller/scene/animation/animation.h + ../../../flutter/LICENSE
15851583
ORIGIN: ../../../flutter/impeller/scene/animation/animation_clip.cc + ../../../flutter/LICENSE
@@ -3701,16 +3699,6 @@ FILE: ../../../flutter/impeller/core/platform.cc
37013699
FILE: ../../../flutter/impeller/core/platform.h
37023700
FILE: ../../../flutter/impeller/core/range.cc
37033701
FILE: ../../../flutter/impeller/core/range.h
3704-
FILE: ../../../flutter/impeller/core/resource_binder.cc
3705-
FILE: ../../../flutter/impeller/core/resource_binder.h
3706-
FILE: ../../../flutter/impeller/core/runtime_types.cc
3707-
FILE: ../../../flutter/impeller/core/runtime_types.h
3708-
FILE: ../../../flutter/impeller/core/sampler.cc
3709-
FILE: ../../../flutter/impeller/core/sampler.h
3710-
FILE: ../../../flutter/impeller/core/sampler_descriptor.cc
3711-
FILE: ../../../flutter/impeller/core/sampler_descriptor.h
3712-
FILE: ../../../flutter/impeller/core/shader_types.cc
3713-
FILE: ../../../flutter/impeller/core/shader_types.h
37143702
FILE: ../../../flutter/impeller/core/texture.cc
37153703
FILE: ../../../flutter/impeller/core/texture.h
37163704
FILE: ../../../flutter/impeller/core/texture_descriptor.cc
@@ -4135,6 +4123,10 @@ FILE: ../../../flutter/impeller/renderer/render_target.cc
41354123
FILE: ../../../flutter/impeller/renderer/render_target.h
41364124
FILE: ../../../flutter/impeller/renderer/renderer.cc
41374125
FILE: ../../../flutter/impeller/renderer/renderer.h
4126+
FILE: ../../../flutter/impeller/renderer/sampler.cc
4127+
FILE: ../../../flutter/impeller/renderer/sampler.h
4128+
FILE: ../../../flutter/impeller/renderer/sampler_descriptor.cc
4129+
FILE: ../../../flutter/impeller/renderer/sampler_descriptor.h
41384130
FILE: ../../../flutter/impeller/renderer/sampler_library.cc
41394131
FILE: ../../../flutter/impeller/renderer/sampler_library.h
41404132
FILE: ../../../flutter/impeller/renderer/shader_function.cc
@@ -4143,6 +4135,8 @@ FILE: ../../../flutter/impeller/renderer/shader_key.cc
41434135
FILE: ../../../flutter/impeller/renderer/shader_key.h
41444136
FILE: ../../../flutter/impeller/renderer/shader_library.cc
41454137
FILE: ../../../flutter/impeller/renderer/shader_library.h
4138+
FILE: ../../../flutter/impeller/renderer/shader_types.cc
4139+
FILE: ../../../flutter/impeller/renderer/shader_types.h
41464140
FILE: ../../../flutter/impeller/renderer/snapshot.cc
41474141
FILE: ../../../flutter/impeller/renderer/snapshot.h
41484142
FILE: ../../../flutter/impeller/renderer/stroke.comp
@@ -4157,6 +4151,8 @@ FILE: ../../../flutter/impeller/runtime_stage/runtime_stage.fbs
41574151
FILE: ../../../flutter/impeller/runtime_stage/runtime_stage.h
41584152
FILE: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.cc
41594153
FILE: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.h
4154+
FILE: ../../../flutter/impeller/runtime_stage/runtime_types.cc
4155+
FILE: ../../../flutter/impeller/runtime_stage/runtime_types.h
41604156
FILE: ../../../flutter/impeller/scene/animation/animation.cc
41614157
FILE: ../../../flutter/impeller/scene/animation/animation.h
41624158
FILE: ../../../flutter/impeller/scene/animation/animation_clip.cc

impeller/aiks/canvas.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
#include "impeller/aiks/image.h"
1414
#include "impeller/aiks/paint.h"
1515
#include "impeller/aiks/picture.h"
16-
#include "impeller/core/sampler_descriptor.h"
1716
#include "impeller/entity/entity_pass.h"
1817
#include "impeller/entity/geometry.h"
1918
#include "impeller/geometry/matrix.h"
2019
#include "impeller/geometry/path.h"
2120
#include "impeller/geometry/point.h"
2221
#include "impeller/geometry/vector.h"
22+
#include "impeller/renderer/sampler_descriptor.h"
2323
#include "impeller/typographer/glyph_atlas.h"
2424
#include "impeller/typographer/text_frame.h"
2525

impeller/compiler/code_gen_template.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ constexpr std::string_view kReflectionHeaderTemplate =
1818
{# file itself and the no-check declarations will be stripped in generated files.#}
1919
#include "impeller/core/buffer_view.h" {# // nogncheck #}
2020
21-
#include "impeller/core/sampler.h" {# // nogncheck #}
21+
#include "impeller/renderer/command.h" {# // nogncheck #}
2222
23-
#include "impeller/core/shader_types.h" {# // nogncheck #}
23+
#include "impeller/renderer/compute_command.h" {# // nogncheck #}
2424
25-
#include "impeller/core/resource_binder.h" {# // nogncheck #}
25+
#include "impeller/renderer/sampler.h" {# // nogncheck #}
26+
27+
#include "impeller/renderer/shader_types.h" {# // nogncheck #}
2628
2729
#include "impeller/core/texture.h" {# // nogncheck #}
2830

impeller/compiler/reflector.cc

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,21 @@ static std::string ExecutionModelToString(spv::ExecutionModel model) {
8686
}
8787
}
8888

89+
static std::string ExecutionModelToCommandTypeName(
90+
spv::ExecutionModel execution_model) {
91+
switch (execution_model) {
92+
case spv::ExecutionModel::ExecutionModelVertex:
93+
case spv::ExecutionModel::ExecutionModelFragment:
94+
case spv::ExecutionModel::ExecutionModelTessellationControl:
95+
case spv::ExecutionModel::ExecutionModelTessellationEvaluation:
96+
return "Command&";
97+
case spv::ExecutionModel::ExecutionModelGLCompute:
98+
return "ComputeCommand&";
99+
default:
100+
return "unsupported";
101+
}
102+
}
103+
89104
static std::string StringToShaderStage(std::string str) {
90105
if (str == "vertex") {
91106
return "ShaderStage::kVertex";
@@ -1085,7 +1100,7 @@ std::vector<Reflector::BindPrototype> Reflector::ReflectBindPrototypes(
10851100
proto.docstring = stream.str();
10861101
}
10871102
proto.args.push_back(BindPrototypeArgument{
1088-
.type_name = "ResourceBinder&",
1103+
.type_name = ExecutionModelToCommandTypeName(execution_model),
10891104
.argument_name = "command",
10901105
});
10911106
proto.args.push_back(BindPrototypeArgument{
@@ -1104,7 +1119,7 @@ std::vector<Reflector::BindPrototype> Reflector::ReflectBindPrototypes(
11041119
proto.docstring = stream.str();
11051120
}
11061121
proto.args.push_back(BindPrototypeArgument{
1107-
.type_name = "ResourceBinder&",
1122+
.type_name = ExecutionModelToCommandTypeName(execution_model),
11081123
.argument_name = "command",
11091124
});
11101125
proto.args.push_back(BindPrototypeArgument{
@@ -1123,7 +1138,7 @@ std::vector<Reflector::BindPrototype> Reflector::ReflectBindPrototypes(
11231138
proto.docstring = stream.str();
11241139
}
11251140
proto.args.push_back(BindPrototypeArgument{
1126-
.type_name = "ResourceBinder&",
1141+
.type_name = ExecutionModelToCommandTypeName(execution_model),
11271142
.argument_name = "command",
11281143
});
11291144
proto.args.push_back(BindPrototypeArgument{

impeller/core/BUILD.gn

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ impeller_component("core") {
2424
"platform.h",
2525
"range.cc",
2626
"range.h",
27-
"resource_binder.cc",
28-
"resource_binder.h",
29-
"runtime_types.cc",
30-
"runtime_types.h",
31-
"sampler.cc",
32-
"sampler.h",
33-
"sampler_descriptor.cc",
34-
"sampler_descriptor.h",
35-
"shader_types.cc",
36-
"shader_types.h",
3727
"texture.cc",
3828
"texture.h",
3929
"texture_descriptor.cc",

impeller/core/resource_binder.cc

Lines changed: 0 additions & 11 deletions
This file was deleted.

impeller/core/resource_binder.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

impeller/display_list/nine_patch_converter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#include "impeller/aiks/canvas.h"
1111
#include "impeller/aiks/image.h"
1212
#include "impeller/aiks/paint.h"
13-
#include "impeller/core/sampler_descriptor.h"
1413
#include "impeller/geometry/path.h"
14+
#include "impeller/renderer/sampler_descriptor.h"
1515

1616
namespace impeller {
1717

impeller/entity/contents/atlas_contents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include <vector>
1010

1111
#include "flutter/fml/macros.h"
12-
#include "impeller/core/sampler_descriptor.h"
1312
#include "impeller/entity/contents/contents.h"
1413
#include "impeller/entity/entity.h"
14+
#include "impeller/renderer/sampler_descriptor.h"
1515

1616
namespace impeller {
1717

impeller/entity/contents/color_source_contents.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#include "impeller/entity/contents/color_source_contents.h"
5+
#include "color_source_contents.h"
66

77
#include "impeller/entity/entity.h"
88
#include "impeller/geometry/matrix.h"
9-
#include "impeller/geometry/point.h"
109

1110
namespace impeller {
1211

0 commit comments

Comments
 (0)