Prepare ui-graphics/ui-text for future upstreaming: extract skiko implementation into separate module#3126
Draft
Ivan Matkov (MatkovIvan) wants to merge 4 commits into
Draft
Prepare ui-graphics/ui-text for future upstreaming: extract skiko implementation into separate module#3126Ivan Matkov (MatkovIvan) wants to merge 4 commits into
Ivan Matkov (MatkovIvan) wants to merge 4 commits into
Conversation
1a3662d to
2181d8d
Compare
ApoloApps
reviewed
Jun 17, 2026
ApoloApps
reviewed
Jun 17, 2026
ApoloApps
reviewed
Jun 17, 2026
b8fa9ce to
fe261a8
Compare
Move the Skia-backed implementation of ui-graphics into a new :compose:ui:ui-skiko module, leaving ui-graphics' nonAndroidMain Skia-free. The common code keeps thin expect/actual delegators that resolve a registered ComposeUiGraphicsImplementation at runtime; the real org.jetbrains.skia code lives in ui-skiko's Skiko*Support classes. Source-set topology: commonMain -> nonAndroidMain (Skia-free) -> skikoMain (Skia compat) -> desktop/native/web leaves. - Canvas/Paint/Path/PathEffect/PathMeasure/PathIterator/ImageBitmap/ Matrices/GraphicsLayer/Blur/Rects relocate to ui-skiko as registry- backed delegators. - The Skia-holding expect-class actuals (Shader, ColorFilter, BlurEffect/OffsetEffect/RenderEffect) become Skiko-free via the PlatformBindings pattern: an opaque @InternalComposeUiApi Platform* binding in ui-graphics, implemented in ui-skiko. - Public Skia-interop extensions (skiaPaint, skiaImageFilter, asComposePath, ...) move to ui-skiko keeping their original package and @file:JvmName facade anchors, preserving desktop binary compatibility. Deprecated Skia-returning members that cannot be extensions delegate through a temporary SkikoGraphicsCompat registry. API baselines are regenerated in a later commit.
Move the Skia-backed implementation of ui-text into ui-skiko, leaving ui-text's nonAndroidMain Skia-free, mirroring the graphics extraction. ui-text keeps expect/actual delegators resolving a registered ComposeUiTextImplementation; the org.jetbrains.skia paragraph, font and text-paint code lives in ui-skiko. - Paragraph building, intrinsics, char helpers and the font subsystem (FontFamilyResolver, font loading, PlatformFont) relocate to ui-skiko. - The font subsystem is ui-text's own public API with per-platform loadTypeface actuals, so the unavoidable public Skia-typed surface stays in ui-text's skikoMain compat layer (Skia-free nonAndroidMain -> Skia skikoMain -> platform leaves); only the implementation moves. - ComposeUiSkikoRuntime.registerSkikoComposeImplementation() now wires both the graphics and text implementations (plus the temporary SkikoGraphicsCompat bridge). API baselines are regenerated in a later commit.
Wire registerSkikoComposeImplementation() into the Skiko-backed Compose entry points so the ui-graphics/ui-text registries are populated before any scene is created: desktop ComposePanel/ComposeWindowPanel, macOS ComposeWindow, iOS ComposeUIViewController, web ComposeWindowInternal, ImageComposeScene, and the ui-test rules. Adds the :compose:ui:ui-skiko dependency to the modules that rely on the Skiko backend transitively (ui, ui-test, ui-test-junit4, foundation) and registers in the affected test harnesses.
fe261a8 to
efe68ef
Compare
Record the post-extraction public API. ui-graphics/ui-text baselines shrink by the relocation-only removals (the Skia-interop extensions and helpers now published from ui-skiko under identical package + facade names); no other public declarations change. Desktop binary compatibility is preserved through the @file:JvmName facade anchors and the HIDDEN split-facade shims in ui-skiko.
efe68ef to
5d58fd1
Compare
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.
CMP-9813 Extract
ui-graphics/ui-textskiko implementation intoui-skikomoduleCMP-9814 Runtime registration of
ui-skikoRelease Notes
N/A