[Impeller] Apply only the alpha channel for bitmap text colors (flutter/engine#40362)

[Impeller] Apply only the alpha channel for bitmap text colors
This commit is contained in:
Jason Simmons
2023-03-16 17:13:22 -07:00
committed by GitHub
parent 25727539bb
commit f2d20c37e5
2 changed files with 14 additions and 13 deletions

View File

@@ -19,7 +19,8 @@ out vec4 frag_color;
void main() {
vec4 value = texture(glyph_atlas_sampler, v_uv);
if (v_has_color != 1.0) {
value = value.aaaa;
frag_color = value.aaaa * frag_info.text_color;
} else {
frag_color = value * frag_info.text_color.a;
}
frag_color = value * frag_info.text_color;
}

View File

@@ -6736,9 +6736,9 @@
"varying"
],
"longest_path_cycles": [
0.09375,
0.03125,
0.09375,
0.078125,
0.0625,
0.078125,
0.0,
0.0,
0.375,
@@ -6758,8 +6758,8 @@
],
"shortest_path_cycles": [
0.0625,
0.03125,
0.0625,
0.046875,
0.0,
0.0,
0.375,
@@ -6769,9 +6769,9 @@
"varying"
],
"total_cycles": [
0.09375,
0.03125,
0.09375,
0.078125,
0.0625,
0.078125,
0.0,
0.0,
0.375,
@@ -10542,8 +10542,8 @@
],
"longest_path_cycles": [
0.0625,
0.03125,
0.0625,
0.046875,
0.0,
0.0,
0.375,
@@ -10563,8 +10563,8 @@
],
"shortest_path_cycles": [
0.0625,
0.03125,
0.0625,
0.046875,
0.0,
0.0,
0.375,
@@ -10575,8 +10575,8 @@
],
"total_cycles": [
0.0625,
0.03125,
0.0625,
0.046875,
0.0,
0.0,
0.375,
@@ -10586,7 +10586,7 @@
"stack_spill_bytes": 0,
"thread_occupancy": 100,
"uniform_registers_used": 6,
"work_registers_used": 6
"work_registers_used": 7
}
}
}