Skip to content

[CP-stable] [Impeller] Fix positioning of text shadow masks - #188766

Merged
auto-submit[bot] merged 1 commit into
flutter:flutter-3.44-candidate.0from
flar:cp-stable-fix-impeller-text-shadow-position
Jun 30, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:flutter-3.44-candidate.0from
flar:cp-stable-fix-impeller-text-shadow-position

Conversation

@flar

@flar flar commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This pull request is created manually per (https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#188035

Impact Description:

Apps that use shadows on Text will have those shadows separate from the text and appear at the coordinate origin of the nearest widget that wraps things with some kind of SaveLayer or engine layer.

Changelog Description:

Explain this cherry pick:

  • Ensures that shadows track the position of text even when enclosed in a SaveLayer
  • Prior to this fix, those shadows would appear at the origin of such a SaveLayer - typically the upper or lower corner of one of the parent widgets.
  • This would happen on all platforms.

[flutter/188035] When rendering text with shadows, the shadows would appear elsewhere on the screen, separate from the text

Workaround:

No known workarounds exist.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

The golden images created by this PR will verify the code is correct if the shadows on the text appear directly underneath each rendered string.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 30, 2026
@github-actions github-actions Bot added a: text input Entering text in a text field or keyboard related problems engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Jun 30, 2026
@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates Impeller's text rendering by baking the text position translation directly into the entity's transform in Canvas::DrawTextFrame, rather than applying it later in TextContents. A new unit test is added to verify text rendering with shadows and positioning. The feedback suggests removing the now-unused position parameter from ComputeVertexData and deleting the unused position_ member variable in TextContents to clean up the API.

Comment thread engine/src/flutter/impeller/entity/contents/text_contents.cc
@flar flar added the cp: review Cherry-picks in the review queue label Jun 30, 2026
@flar flar changed the title [stable] [Impeller] Fix positioning of text shadow masks [CP-stable] [Impeller] Fix positioning of text shadow masks Jun 30, 2026
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 30, 2026
@auto-submit
auto-submit Bot merged commit 83675ed into flutter:flutter-3.44-candidate.0 Jun 30, 2026
174 checks passed
Anas-Qasem pushed a commit to Anas-Qasem/flutter that referenced this pull request Aug 11, 2026
…188766)

This pull request is created manually per (https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#188035

### Impact Description:
Apps that use shadows on Text will have those shadows separate from the text and appear at the coordinate origin of the nearest widget that wraps things with some kind of SaveLayer or engine layer.

### Changelog Description:
Explain this cherry pick:
* Ensures that shadows track the position of text even when enclosed in a SaveLayer
* Prior to this fix, those shadows would appear at the origin of such a SaveLayer - typically the upper or lower corner of one of the parent widgets.
* This would happen on all platforms.

[flutter/188035] When rendering text with shadows, the shadows would appear elsewhere on the screen, separate from the text

### Workaround:
No known workarounds exist.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
The golden images created by this PR will verify the code is correct if the shadows on the text appear directly underneath each rendered string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD cp: review Cherry-picks in the review queue e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants