Optimize code size for render-data.ts#18259
Merged
Merged
Conversation
👍 Package size ⤵ -922 bytes, old: 5193364, new: 5192442Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -3415,9 +3415,8 @@
constructor(vertexFormat?: gfx.Attribute[]);
isValid(): false | __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
initRenderDrawInfo(comp: UIRenderer, drawInfoType?: __private._cocos_2d_renderer_render_draw_info__RenderDrawInfoType): void;
removeRenderDrawInfo(comp: UIRenderer): void;
- protected setRenderDrawInfoAttributes(): void;
}
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
@@ -3446,13 +3445,16 @@
vertexRow: number;
vertexCol: number;
constructor(vertexFormat?: gfx.Attribute[], accessor?: __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor | null);
resize(vertexCount: number, indexCount: number): void;
+ /** @mangle */
protected setRenderDrawInfoAttributes(): void;
/**
* @internal
+ * @mangle
*/
fillDrawInfoAttributes(drawInfo: __private._cocos_2d_renderer_render_draw_info__RenderDrawInfo): void;
+ /** @mangle */
protected syncRender2dBuffer(): void;
resizeAndCopy(vertexCount: number, indexCount: number): void;
getMeshBuffer(): MeshBuffer | null;
updateNode(comp: UIRenderer): void;
@@ -3513,9 +3515,8 @@
clear(): void;
protected _initIAInfo(device: gfx.Device): void;
protected _reallocBuffer(vCount: number, iCount: number): void;
setRenderDrawInfoAttributes(): void;
- particleInitRenderDrawInfo(entity: __private._cocos_2d_renderer_render_entity__RenderEntity): void;
}
/**
* @internal
*/
|
Contributor
Author
Contributor
Author
|
@cocos-robot run test cases |
1 similar comment
Contributor
Author
|
@cocos-robot run test cases |
|
@dumganhar, Please check the result of
Task Details
|
|
@dumganhar, Please check the result of
Task Details
|
minggo
reviewed
Feb 13, 2025
|
|
||
| protected setRenderDrawInfoAttributes (): void { | ||
| /** @mangle */ | ||
| protected override setRenderDrawInfoAttributes (): void { |
Contributor
There was a problem hiding this comment.
Why can use mangle for protected function?
Contributor
There was a problem hiding this comment.
Is it because it is related with jsb?
Contributor
Author
There was a problem hiding this comment.
RenderDrawInfo relevant APIs are all used for native (JSB). Non-native platforms don't need that.
minggo
approved these changes
Feb 13, 2025
Contributor
Author
|
@cocos-robot run test cases |
|
@dumganhar, Please check the result of
Task Details
|
|
@dumganhar, Please check the result of
Task Details |
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: #18222
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: