Merged
Conversation
e990d8a to
ae7dfb7
Compare
PPpro
commented
Jul 18, 2019
| this._assemblerData = this._assembler._getAssemblerData(); | ||
| this._ttfTexture.on('load', function () { | ||
| self._assembler && self._assembler._resetAssemblerData && self._assembler._resetAssemblerData(self._assemblerData); | ||
| }); |
Contributor
There was a problem hiding this comment.
这里确认一下是否会多次注册事件,用代码动态切换字体来测试。
Contributor
Author
There was a problem hiding this comment.
测试是不会重复注册,不过这里确实应该取消注册会比较好。我更新一下
jareguo
reviewed
Jul 18, 2019
| let width = ctx.measureText(char).width; | ||
| let measureResult = ctx.measureText(char); | ||
| let width = measureResult.width; | ||
| // NOTE: not merge into v2.2.0, move into Alipay adapter |
jareguo
added a commit
that referenced
this pull request
Jul 23, 2019
* commit '94e490299e0e5c860305ae3f0324a1bb5c222852': fixed api link error. (#4920) support alipay minigame (#4880) fixed api docs (#4918) add Edge browser type && fix webAudio bug on Edge and Baidu browser (#4910) remove warning when upgrading editBox compnent (#4916) refine code (#4900) fix scrollView bug for 2d-tasks/issues/1555 (#4894) # Conflicts: # cocos2d/core/mesh/CCMesh.js # cocos2d/core/platform/CCSys.js # cocos2d/core/platform/CCView.js # cocos2d/videoplayer/video-player-impl.js
jareguo
added a commit
that referenced
this pull request
Jul 23, 2019
* v2.2.0: fixed api link error. (#4920) support alipay minigame (#4880) fixed api docs (#4918) add Edge browser type && fix webAudio bug on Edge and Baidu browser (#4910) remove warning when upgrading editBox compnent (#4916) move platform related code (#4913) fix warn after subContextView modules are excluded (#4737) refine code (#4900) fix scrollView bug for 2d-tasks/issues/1555 (#4894) # Conflicts: # cocos2d/core/mesh/CCMesh.js # cocos2d/core/platform/CCSys.js # cocos2d/core/utils/profiler/CCProfiler.js
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.
Re: https://github.com/cocos-creator/2d-tasks/issues/1615
由于支付宝创建离屏 canvas 的成本较高,测试是创建 30 个 canvas 内存就会崩
目前是尽量回收 canvas,在提交完 texture 之后就回收 canvas,之后优化的方向是尽量使用一个 canvas 来绘制
pr 里还有一些平台相关的代码, 2.2 分支里要移到 adapter 层