Skip to content

Adopt upstream deprecations in ui-graphics#2802

Merged
Ivan Matkov (MatkovIvan) merged 3 commits into
jb-mainfrom
ivan.matkov/skia-paint-as-ext
Feb 27, 2026
Merged

Adopt upstream deprecations in ui-graphics#2802
Ivan Matkov (MatkovIvan) merged 3 commits into
jb-mainfrom
ivan.matkov/skia-paint-as-ext

Conversation

@MatkovIvan

@MatkovIvan Ivan Matkov (MatkovIvan) commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator

CMP-9776 Adapt the sources for expect class NativePaint deprecation

Release Notes

Migration Notes - Multiple Platforms

  • androidx.compose.ui.graphics.NativePaint and androidx.compose.ui.graphics.NativeCanvas typealiases are deprecated, use direct references to native types instead.
  • Paint.asFrameworkPaint() was replaced with Paint.skiaPaint extension to avoid exposing a platform type into commonMain sourceset via typealias

Add the Paint.nativePaint bridge API, update skia-backed canvas/paint internals to use explicit skia aliases
Replace non-Android asFrameworkPaint usages with nativePaint in ui and ui-text, and make SkiaTextPaint expose its delegated native paint safely for ParagraphBuilder.
@Deprecated(
message = "Use asSkiaColorFilter()",
replaceWith = ReplaceWith("asSkiaColorFilter()"),
level = DeprecationLevel.ERROR,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It has been deprecated since 2021, I'm not sure that it is worth mentioning in the changelog/migration notes since I'm almost sure that nobody uses this

@MatkovIvan Ivan Matkov (MatkovIvan) merged commit bb3ec1f into jb-main Feb 27, 2026
26 checks passed
@MatkovIvan Ivan Matkov (MatkovIvan) deleted the ivan.matkov/skia-paint-as-ext branch February 27, 2026 15:49
Ivan Matkov (MatkovIvan) added a commit that referenced this pull request Mar 2, 2026
…#2809)

#2802's follow-up
[CMP-9836](https://youtrack.jetbrains.com/issue/CMP-9836) Deprecate
`.native*` extensions in favor to `.skia*` in `ui-graphics`

## Release Notes
### Migration Notes - Multiple Platforms
- `RenderEffect.asSkiaImageFilter()` was replaced to
`RenderEffect.skiaImageFilter` extension to avoid exposing a platform
type into `commonMain` types
- Deprecated `Canvas.nativeCanvas` extension in favor to
`Canvas.skiaCanvas` to avoid ambiguity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants