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

Commit b98b311

Browse files
committed
feedback and malioc
1 parent 18fef00 commit b98b311

File tree

3 files changed

+197
-7
lines changed

3 files changed

+197
-7
lines changed

impeller/entity/contents/texture_contents.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool TextureContents::Render(const ContentContext& renderer,
165165
#endif // IMPELLER_ENABLE_OPENGLES
166166

167167
if (!cmd.pipeline) {
168-
if (strict_source_rect_) {
168+
if (strict_source_rect_enabled_) {
169169
cmd.pipeline = renderer.GetTextureStrictSrcPipeline(pipeline_options);
170170
} else {
171171
cmd.pipeline = renderer.GetTexturePipeline(pipeline_options);
@@ -180,7 +180,7 @@ bool TextureContents::Render(const ContentContext& renderer,
180180
cmd, texture_,
181181
renderer.GetContext()->GetSamplerLibrary()->GetSampler(
182182
sampler_descriptor_));
183-
} else if (strict_source_rect_) {
183+
} else if (strict_source_rect_enabled_) {
184184
// For a strict source rect, shrink the texture coordinate range by half a
185185
// texel to ensure that linear filtering does not sample anything outside
186186
// the source rect bounds.
@@ -189,8 +189,7 @@ bool TextureContents::Render(const ContentContext& renderer,
189189

190190
FSStrictSrc::FragInfo frag_info;
191191
frag_info.source_rect = Vector4(strict_texture_coords.GetLTRB());
192-
FSStrictSrc::BindFragInfo(
193-
cmd, pass.GetTransientsBuffer().EmplaceUniform(frag_info));
192+
FSStrictSrc::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info));
194193
FSStrictSrc::BindTextureSampler(
195194
cmd, texture_,
196195
renderer.GetContext()->GetSamplerLibrary()->GetSampler(
@@ -215,11 +214,11 @@ const Rect& TextureContents::GetSourceRect() const {
215214
}
216215

217216
void TextureContents::SetStrictSourceRect(bool strict) {
218-
strict_source_rect_ = strict;
217+
strict_source_rect_enabled_ = strict;
219218
}
220219

221220
bool TextureContents::GetStrictSourceRect() const {
222-
return strict_source_rect_;
221+
return strict_source_rect_enabled_;
223222
}
224223

225224
void TextureContents::SetSamplerDescriptor(SamplerDescriptor desc) {

impeller/entity/contents/texture_contents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class TextureContents final : public Contents {
8989
std::shared_ptr<Texture> texture_;
9090
SamplerDescriptor sampler_descriptor_ = {};
9191
Rect source_rect_;
92-
bool strict_source_rect_ = false;
92+
bool strict_source_rect_enabled_ = false;
9393
Scalar opacity_ = 1.0f;
9494
Scalar inherited_opacity_ = 1.0f;
9595
bool defer_applying_opacity_ = false;

impeller/tools/malioc.json

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6969,6 +6969,127 @@
69696969
}
69706970
}
69716971
},
6972+
"flutter/impeller/entity/gles/texture_fill_strict_src.frag.gles": {
6973+
"Mali-G78": {
6974+
"core": "Mali-G78",
6975+
"filename": "flutter/impeller/entity/gles/texture_fill_strict_src.frag.gles",
6976+
"has_side_effects": false,
6977+
"has_uniform_computation": false,
6978+
"modifies_coverage": false,
6979+
"reads_color_buffer": false,
6980+
"type": "Fragment",
6981+
"uses_late_zs_test": false,
6982+
"uses_late_zs_update": false,
6983+
"variants": {
6984+
"Main": {
6985+
"fp16_arithmetic": 33,
6986+
"has_stack_spilling": false,
6987+
"performance": {
6988+
"longest_path_bound_pipelines": [
6989+
"varying"
6990+
],
6991+
"longest_path_cycles": [
6992+
0.109375,
6993+
0.03125,
6994+
0.109375,
6995+
0.0,
6996+
0.0,
6997+
0.375,
6998+
0.25
6999+
],
7000+
"pipelines": [
7001+
"arith_total",
7002+
"arith_fma",
7003+
"arith_cvt",
7004+
"arith_sfu",
7005+
"load_store",
7006+
"varying",
7007+
"texture"
7008+
],
7009+
"shortest_path_bound_pipelines": [
7010+
"varying"
7011+
],
7012+
"shortest_path_cycles": [
7013+
0.078125,
7014+
0.03125,
7015+
0.078125,
7016+
0.0,
7017+
0.0,
7018+
0.375,
7019+
0.25
7020+
],
7021+
"total_bound_pipelines": [
7022+
"varying"
7023+
],
7024+
"total_cycles": [
7025+
0.109375,
7026+
0.03125,
7027+
0.109375,
7028+
0.0,
7029+
0.0,
7030+
0.375,
7031+
0.25
7032+
]
7033+
},
7034+
"stack_spill_bytes": 0,
7035+
"thread_occupancy": 100,
7036+
"uniform_registers_used": 4,
7037+
"work_registers_used": 20
7038+
}
7039+
}
7040+
},
7041+
"Mali-T880": {
7042+
"core": "Mali-T880",
7043+
"filename": "flutter/impeller/entity/gles/texture_fill_strict_src.frag.gles",
7044+
"has_uniform_computation": false,
7045+
"type": "Fragment",
7046+
"variants": {
7047+
"Main": {
7048+
"has_stack_spilling": false,
7049+
"performance": {
7050+
"longest_path_bound_pipelines": [
7051+
"arithmetic",
7052+
"load_store",
7053+
"texture"
7054+
],
7055+
"longest_path_cycles": [
7056+
1.0,
7057+
1.0,
7058+
1.0
7059+
],
7060+
"pipelines": [
7061+
"arithmetic",
7062+
"load_store",
7063+
"texture"
7064+
],
7065+
"shortest_path_bound_pipelines": [
7066+
"arithmetic",
7067+
"load_store",
7068+
"texture"
7069+
],
7070+
"shortest_path_cycles": [
7071+
1.0,
7072+
1.0,
7073+
1.0
7074+
],
7075+
"total_bound_pipelines": [
7076+
"arithmetic",
7077+
"load_store",
7078+
"texture"
7079+
],
7080+
"total_cycles": [
7081+
1.0,
7082+
1.0,
7083+
1.0
7084+
]
7085+
},
7086+
"thread_occupancy": 100,
7087+
"uniform_registers_used": 1,
7088+
"work_registers_used": 2
7089+
}
7090+
}
7091+
}
7092+
},
69727093
"flutter/impeller/entity/gles/tiled_texture_fill.frag.gles": {
69737094
"Mali-G78": {
69747095
"core": "Mali-G78",
@@ -10169,6 +10290,76 @@
1016910290
}
1017010291
}
1017110292
},
10293+
"flutter/impeller/entity/texture_fill_strict_src.frag.vkspv": {
10294+
"Mali-G78": {
10295+
"core": "Mali-G78",
10296+
"filename": "flutter/impeller/entity/texture_fill_strict_src.frag.vkspv",
10297+
"has_side_effects": false,
10298+
"has_uniform_computation": true,
10299+
"modifies_coverage": false,
10300+
"reads_color_buffer": false,
10301+
"type": "Fragment",
10302+
"uses_late_zs_test": false,
10303+
"uses_late_zs_update": false,
10304+
"variants": {
10305+
"Main": {
10306+
"fp16_arithmetic": 33,
10307+
"has_stack_spilling": false,
10308+
"performance": {
10309+
"longest_path_bound_pipelines": [
10310+
"varying"
10311+
],
10312+
"longest_path_cycles": [
10313+
0.078125,
10314+
0.03125,
10315+
0.078125,
10316+
0.0,
10317+
0.0,
10318+
0.375,
10319+
0.25
10320+
],
10321+
"pipelines": [
10322+
"arith_total",
10323+
"arith_fma",
10324+
"arith_cvt",
10325+
"arith_sfu",
10326+
"load_store",
10327+
"varying",
10328+
"texture"
10329+
],
10330+
"shortest_path_bound_pipelines": [
10331+
"varying"
10332+
],
10333+
"shortest_path_cycles": [
10334+
0.078125,
10335+
0.03125,
10336+
0.078125,
10337+
0.0,
10338+
0.0,
10339+
0.375,
10340+
0.25
10341+
],
10342+
"total_bound_pipelines": [
10343+
"varying"
10344+
],
10345+
"total_cycles": [
10346+
0.078125,
10347+
0.03125,
10348+
0.078125,
10349+
0.0,
10350+
0.0,
10351+
0.375,
10352+
0.25
10353+
]
10354+
},
10355+
"stack_spill_bytes": 0,
10356+
"thread_occupancy": 100,
10357+
"uniform_registers_used": 6,
10358+
"work_registers_used": 6
10359+
}
10360+
}
10361+
}
10362+
},
1017210363
"flutter/impeller/entity/tiled_texture_fill.frag.vkspv": {
1017310364
"Mali-G78": {
1017410365
"core": "Mali-G78",

0 commit comments

Comments
 (0)