-
Notifications
You must be signed in to change notification settings - Fork 22
ohos: Improve the skeleton code of ovCompose access to OHOS unified rendering (Render Service) #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ohos-compose-1.6.1-20250919
Are you sure you want to change the base?
Conversation
...ion/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNode.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: wuxujie <[email protected]>
feat:add picture recorder for render node
|
sebuntin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
06f7176 to
bd77e49
Compare
…native paint synchronization
bd77e49 to
c4be0c4
Compare
6eb53db to
fc27bab
Compare
5608dc4 to
f2b2658
Compare
6690afd to
ff6eb1c
Compare
|
|
||
| void OHRenderNodeDrawClipRect(float left, float top, float right, float bottom, const RenderNodeSaveState *saveState, | ||
| BaseRenderNode *renderNodeForDrawing) { | ||
| ArkUI_RectShapeOption *shape = OH_ArkUI_RenderNodeUtils_CreateRectShapeOption(); |
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.
clip 频率非常高,这个 shape 有办法全局复用吗?或者能否先判断当前的 renderNode 上是否已经存在了 shape ?
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.
可以考虑将这个shape提取到renderNode中,跟随renderNode的生命周期,只要renderNode不被销毁,shape也可以被这个renderNode一直复用
| return this; | ||
| } | ||
|
|
||
| BaseRenderNode* setTransform(float* matrix) { |
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.
下面已经有了 BaseRenderNode* setTransform(const float* matrix),应该可以删除这个了 BaseRenderNode* setTransform(float* matrix)
|
|
||
| // 释放绘制资源 | ||
| OH_Drawing_CanvasDetachPen(canvas); | ||
| OH_Drawing_PathClose(path); |
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.
看上去少了 OH_Drawing_PathDetory(path) 的调用
|
|
||
| // 释放绘制资源 | ||
| OH_Drawing_CanvasDetachPen(canvas); | ||
| OH_Drawing_PathClose(path); |
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.
OH_Drawing_PathClose 这个会释放 path 吗?看上去和 OH_Drawing_PathDestory 语义不一样
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.
这里应该是写错了,应该调用OH_Drawing_PathDestroy方法
| auto *data = static_cast<RectGradientRenderNode *>(userData); | ||
| auto *canvas1 = OH_ArkUI_DrawContext_GetCanvas(context); | ||
| OH_Drawing_Canvas *canvas = reinterpret_cast<OH_Drawing_Canvas *>(canvas1); | ||
| OH_Drawing_ShaderEffect *shaderEffect = CreateShaderEffect(data->shader); |
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.
这里一定要创建 shaderEffect 吗?
...rc/ohosArm64Main/kotlin/androidx/compose/ui/platform/nativefoundation/AdaptiveCanvas.ohos.kt
Show resolved
Hide resolved
...rc/ohosArm64Main/kotlin/androidx/compose/ui/platform/nativefoundation/AdaptiveCanvas.ohos.kt
Outdated
Show resolved
Hide resolved
| import androidx.compose.ui.graphics.StrokeJoin | ||
| import platform.arkui.OH_Drawing_BlendMode | ||
|
|
||
| internal fun BlendMode.asNativeBlendMode(): OH_Drawing_BlendMode { |
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.
建议加上 inline
| class OHComposeNativePaint(val handle: OHComposeNativePaint_Handle?) { | ||
| fun sync(paint: Paint) { | ||
| // 实现与 OHComposeNativePaint 的同步逻辑 | ||
| LogPrintUtil.verbose("OHComposeNativePaint::sync, compose paint: (${paint.toReadableString()})") |
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.
这里要小心,日志创建的字符串,是 100% 创建的
…vCompose text field on the ohos platform
ohos: Fix OverScroll animation issues by correctly parsing VSync sign…
…ust compiler arguments accordingly
176137b to
1d59d24
Compare
…tive canvas proxy resource management
1d59d24 to
3a977da
Compare
Oh compose ywenjing
Signed-off-by: wuxujie <[email protected]>
feat:wrapper OH_HiTrace
f47f615 to
c03c114
Compare
c03c114 to
1b2af1e
Compare
Signed-off-by: wuxujie <[email protected]>
feat:implement drawingItem diff
- Add LayerSourceType enum (LAZY_LIST_ITEM, REGULAR) - Extend OwnedLayer interface with getSourceType() method - Update Owner.createLayer() API with sourceType parameter (default=REGULAR) - Update OwnedLayerFactory.createLayer() with sourceType parameter - Implement sourceType in ArkUIRenderNodeLayer with isLazyListItem() helper - Update Placeable.placeWithLayer() and placeRelativeWithLayer() APIs - Update NodeCoordinator and RootNodeOwner to propagate sourceType - LazyListMeasuredItem now passes LAZY_LIST_ITEM when placing items This enables OHOS platform to identify LazyList item layers. fix: 解决LazyColumn组件的滑动问题
…nvas feat: Add support for drawing oval, arc, and path shapes in canvas
… text to SkBitmap
…es, and paths in the canvas
…nd improve border style handling
…and enhance color filter support
…anced gradient rendering capabilities
…ng and reduce memory overhead
ohos: Add skeleton code for OHOS text measurement and rendering to prevent text rendering process from crashing