Canvas2D 的 getImageData 操作建议设置 willReadFrequently 属性为 true 以提高性能 - #19141
Closed
xbpiao wants to merge 1 commit into
Closed
Canvas2D 的 getImageData 操作建议设置 willReadFrequently 属性为 true 以提高性能#19141xbpiao wants to merge 1 commit into
xbpiao wants to merge 1 commit into
Conversation
Code Size Check Report
Interface Check ReportThis pull request does not change any public interfaces ! |
Contributor
Author
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.

参考:https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
在 texture-cube.ts 文件中,当创建 Canvas2D 上下文时,没有设置 willReadFrequently 属性为 true,导致多次使用 getImageData 时性能较差。
Re: # 重现步骤:新建Hello World工程,使用Chrome版本 144.0.7559.110(正式版本) (64 位)预览发现错误
把错误扔给TRAE修复
修复后没有错误
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: