Migrate gradient creation to the new SkShaders API#180766
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates gradient creation to the new Skia SkShaders API, which is a good modernization step. The changes are well-contained and correctly update the API calls and associated data types like SkColor4f. I've included a couple of suggestions: one to refactor duplicated code for better maintainability in dl_sk_conversions.cc, and another to improve precision in a test case in dl_rendering_unittests.cc to ensure correctness.
7ebe2a7 to
74be125
Compare
558b22d to
2909b11
Compare
Update calls from the deprecated SkGradientShader::MakeLinear and SkGradientShader::MakeRadial to the new SkShaders::LinearGradient and SkShaders::RadialGradient functions. This implies updating the gradient color specifications from SkColor to SkColor4f. The macro SK_SUPPORT_LEGACY_UNSPANNED_GRADIENTS is removed.
2909b11 to
bdaf473
Compare
jason-simmons
approved these changes
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 17, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 17, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 17, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 18, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 18, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 19, 2026
calltekk
pushed a commit
to calltekk/flutter
that referenced
this pull request
Jan 19, 2026
Update calls from the deprecated SkGradientShader::MakeLinear and SkGradientShader::MakeRadial to the new SkShaders::LinearGradient and SkShaders::RadialGradient functions. This implies updating the gradient color specifications from SkColor to SkColor4f. The macro SK_SUPPORT_LEGACY_UNSPANNED_GRADIENTS is removed.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 19, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 19, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 21, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 21, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 21, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 22, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 22, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 22, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 23, 2026
flutter-zl
pushed a commit
to flutter-zl/flutter
that referenced
this pull request
Feb 10, 2026
Update calls from the deprecated SkGradientShader::MakeLinear and SkGradientShader::MakeRadial to the new SkShaders::LinearGradient and SkShaders::RadialGradient functions. This implies updating the gradient color specifications from SkColor to SkColor4f. The macro SK_SUPPORT_LEGACY_UNSPANNED_GRADIENTS is removed.
liuyq
pushed a commit
to liuyq/flutter
that referenced
this pull request
Apr 3, 2026
refer to the following commit:
e9693c6("Migrate gradient creation to the new SkShaders API (flutter#180766)")
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update calls from the deprecated SkGradientShader::MakeLinear and SkGradientShader::MakeRadial to the new SkShaders::LinearGradient and SkShaders::RadialGradient functions. This implies updating the gradient color specifications from SkColor to SkColor4f. The macro SK_SUPPORT_LEGACY_UNSPANNED_GRADIENTS is removed.