-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] fix incorrect origins for mesh gradient computation. #54762
Conversation
out vec4 frag_color; | ||
|
||
// Output solid red if frag position is within LTRB rectangle. | ||
void main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only outputs red if the rendered coordiantes match the expected coordinates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just one question about uninitialized frag_color.
// The blue rectangle drawn under them should not be visible. | ||
TEST_P(AiksTest, | ||
DrawVerticesTextureCoordinatesWithFragmentShaderNonZeroOrigin) { | ||
std::vector<SkPoint> positions_lt = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No abbreviations ("lt").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
void main() { | ||
if (FlutterFragCoord().x >= ltrb.x && FlutterFragCoord().x <= ltrb.z && | ||
FlutterFragCoord().y >= ltrb.y && FlutterFragCoord().y <= ltrb.w) { | ||
frag_color = vec4(1.0, 0.0, 0.0, 1.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, what is frag_color if it's outside of the box? Shouldn't that be explicit here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can set it to transparent black, I think that is implied already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering we are cross compiling the shaders it doesn't hurt, thanks.
builder.DrawRect(SkRect::MakeLTRB(200, 200, 250, 250), rect_paint); | ||
builder.DrawVertices(vertices_lt, flutter::DlBlendMode::kSrcOver, paint); | ||
|
||
ASSERT_TRUE(OpenPlaygroundHere(builder.Build())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up you are going to need to add the included golden file to the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually just wait for the check to fail first and then copy the string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm assuming the goldens look good to jonah
…ions) (#154153) Manual roll requested by [email protected] flutter/engine@f645ca5...b41ca79 2024-08-26 [email protected] [Impeller] fix incorrect origins for mesh gradient computation. (flutter/engine#54762) 2024-08-26 [email protected] Change the `ci/analyze.sh` script to analyze _all_ of the engine (flutter/engine#54779) 2024-08-26 [email protected] Use GNI group instead of hardcoding PNG codecs source files. (flutter/engine#54781) 2024-08-26 [email protected] [ios] Fix text input edit rotor accessibility (flutter/engine#54351) 2024-08-26 [email protected] Ensure orchestrators aren't assigned to 32 core machines (flutter/engine#54754) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ter#54762) Fixes flutter/flutter#153964 Changing the origin of the rect used to render a shader could break shaders that expect to render at particular coordinates based on the input vertices. The snapshot functionality correctly handles translating a texture, so the translation was never necessary to begin with.
…ions) (flutter#154153) Manual roll requested by [email protected] flutter/engine@f645ca5...b41ca79 2024-08-26 [email protected] [Impeller] fix incorrect origins for mesh gradient computation. (flutter/engine#54762) 2024-08-26 [email protected] Change the `ci/analyze.sh` script to analyze _all_ of the engine (flutter/engine#54779) 2024-08-26 [email protected] Use GNI group instead of hardcoding PNG codecs source files. (flutter/engine#54781) 2024-08-26 [email protected] [ios] Fix text input edit rotor accessibility (flutter/engine#54351) 2024-08-26 [email protected] Ensure orchestrators aren't assigned to 32 core machines (flutter/engine#54754) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…54762) (#54843) Fixes flutter/flutter#153964 Changing the origin of the rect used to render a shader could break shaders that expect to render at particular coordinates based on the input vertices. The snapshot functionality correctly handles translating a texture, so the translation was never necessary to begin with.
Fixes flutter/flutter#153964
Changing the origin of the rect used to render a shader could break shaders that expect to render at particular coordinates based on the input vertices. The snapshot functionality correctly handles translating a texture, so the translation was never necessary to begin with.