feat(fe+harmony): add canvas feature toDataURL, getImageData, canvassToTempFilePath#252
Open
Hierifer wants to merge 3 commits into
Open
feat(fe+harmony): add canvas feature toDataURL, getImageData, canvassToTempFilePath#252Hierifer wants to merge 3 commits into
Hierifer wants to merge 3 commits into
Conversation
Contributor
Author
|
临时支持 toDataURL, toBlob, getImageData, canvasToTempFile 的异步调用。这里当前和 wx 有点不一样。正在开发一个基于 skia + 同层渲染的框架,让 canvas 渲染再 service (jscore)这边执行。这样就 context 就能像 wx 一样同步调用 |
Contributor
Author
|
cpp 修复 int value = JS_VALUE_GET_INT(jsValue) 的语法问题,cpp 上游依赖包没有锁版本导致语法有所改变 |
dos1in
reviewed
Jun 22, 2026
dos1in
reviewed
Jun 22, 2026
| } | ||
| } | ||
|
|
||
| canvasGetImageData({ bridgeId, params }) { |
Member
There was a problem hiding this comment.
这个新增的 canvasGetImageData render handler 目前不可达。
service 侧没有对应 wrapper,缺失 API 会从 api/index.js (line 48) 走默认 invokeAPI,而默认 target 是 container (line 162),不会调用到 render 层。
如果这次要支持 wx.canvasGetImageData,需要在 core/ui/canvas/index.js 增加 target 为 render 的 API;如果只支持 canvas node API,这段 render handler 建议移除,避免误以为旧 API 已支持。
Contributor
Author
There was a problem hiding this comment.
让 AI 切换了一次方案,代码漏删了。 render 侧的代码已经删除。全部由 service 侧发起, render 实现, service 处理 callback
dos1in
reviewed
Jun 22, 2026
| width, | ||
| height, | ||
| callback: callbackId, | ||
| errorCallback: errorCallbackId, |
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.
No description provided.