Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions impeller/aiks/aiks_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2995,14 +2995,11 @@ TEST_P(AiksTest, SolidColorApplyColorFilter) {

TEST_P(AiksTest, DrawScaledTextWithPerspectiveNoSaveLayer) {
Canvas canvas;
// clang-format off
canvas.Transform(Matrix(
2.000000, 0.000000, 0.000000, 0.000000,
1.445767, 2.637070, -0.507928, 0.001524,
-2.451887, -0.534662, 0.861399, -0.002584,
1063.481934, 1025.951416, -48.300270, 1.144901
));
// clang-format on
canvas.Transform(Matrix(1.0, 0.0, 0.0, 0.0, //
0.0, 1.0, 0.0, 0.0, //
0.0, 0.0, 1.0, 0.01, //
0.0, 0.0, 0.0, 1.0) * //
Matrix::MakeRotationY({Degrees{10}}));

ASSERT_TRUE(RenderTextInCanvasSkia(GetContext(), canvas, "Hello world",
"Roboto-Regular.ttf"));
Expand All @@ -3014,14 +3011,11 @@ TEST_P(AiksTest, DrawScaledTextWithPerspectiveSaveLayer) {
Canvas canvas;
Paint save_paint;
canvas.SaveLayer(save_paint);
// clang-format off
canvas.Transform(Matrix(
2.000000, 0.000000, 0.000000, 0.000000,
1.445767, 2.637070, -0.507928, 0.001524,
-2.451887, -0.534662, 0.861399, -0.002584,
1063.481934, 1025.951416, -48.300270, 1.144901
));
// clang-format on
canvas.Transform(Matrix(1.0, 0.0, 0.0, 0.0, //
0.0, 1.0, 0.0, 0.0, //
0.0, 0.0, 1.0, 0.01, //
0.0, 0.0, 0.0, 1.0) * //
Matrix::MakeRotationY({Degrees{10}}));

ASSERT_TRUE(RenderTextInCanvasSkia(GetContext(), canvas, "Hello world",
"Roboto-Regular.ttf"));
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/blending/framebuffer_blend.vert
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ out vec2 v_src_texture_coords;

void main() {
gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_src_texture_coords =
IPRemapCoords(src_texture_coords, frame_info.src_y_coord_scale);
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/blending/porter_duff_blend.vert
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ out f16vec4 v_color;

void main() {
gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_color = f16vec4(color);
v_texture_coords =
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/border_mask_blur.vert
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ out vec2 v_texture_coords;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_texture_coords =
IPRemapCoords(texture_coords, frame_info.texture_sampler_y_coord_scale);
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/clip.vert
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ in vec2 position;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
}
1 change: 1 addition & 0 deletions impeller/entity/shaders/color_matrix_color_filter.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out vec2 v_texture_coords;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_texture_coords =
IPRemapCoords(position, frame_info.texture_sampler_y_coord_scale);
Expand Down
3 changes: 2 additions & 1 deletion impeller/entity/shaders/glyph_atlas.vert
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ void main() {
0.0, 1.0);
}

gl_Position = frame_info.mvp * vec4(position.xy, 0.0, 1.0);
gl_Position = frame_info.mvp * position;
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_uv = uv_origin + unit_position * uv_size;
v_text_color = frame_info.text_color;
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/gradient_fill.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out vec2 v_position;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_position = IPVec2TransformPosition(frame_info.matrix, position);
}
1 change: 1 addition & 0 deletions impeller/entity/shaders/linear_to_srgb_filter.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out vec2 v_texture_coords;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_texture_coords =
IPRemapCoords(position, frame_info.texture_sampler_y_coord_scale);
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/position_color.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out f16vec4 v_color;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_color = f16vec4(color);
}
1 change: 1 addition & 0 deletions impeller/entity/shaders/rrect_blur.vert
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ out vec2 v_position;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
// The fragment stage uses local coordinates to compute the blur.
v_position = position;
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/runtime_effect.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out vec2 _fragCoord;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
_fragCoord = position;
}
1 change: 1 addition & 0 deletions impeller/entity/shaders/solid_fill.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ IMPELLER_MAYBE_FLAT out f16vec4 v_color;
void main() {
v_color = frame_info.color;
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
}
1 change: 1 addition & 0 deletions impeller/entity/shaders/srgb_to_linear_filter.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out vec2 v_texture_coords;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_texture_coords =
IPRemapCoords(position, frame_info.texture_sampler_y_coord_scale);
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/texture_fill.vert
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ IMPELLER_MAYBE_FLAT out float16_t v_alpha;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_alpha = frame_info.alpha;
v_texture_coords =
Expand Down
1 change: 1 addition & 0 deletions impeller/entity/shaders/yuv_to_rgb_filter.vert
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out vec2 v_texture_coords;

void main() {
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
gl_Position /= gl_Position.w;
gl_Position.z = frame_info.depth;
v_texture_coords =
IPRemapCoords(position, frame_info.texture_sampler_y_coord_scale);
Expand Down
Loading