Skip to content
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

delete ui static component #16288

Merged
merged 4 commits into from
Sep 20, 2023
Merged

delete ui static component #16288

merged 4 commits into from
Sep 20, 2023

Conversation

LinYunMo
Copy link
Contributor

@LinYunMo LinYunMo commented Sep 20, 2023

Re: https://github.com/cocos/3d-tasks/issues/17732
Re: #15890

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@github-actions
Copy link

github-actions bot commented Sep 20, 2023

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -2840,53 +2840,8 @@
         updateRenderer(): void;
         protected createRenderEntity(): __private._cocos_2d_renderer_render_entity__RenderEntity;
     }
     /**
-     * @en
-     * Static batch component of UI.
-     * This component is placed on the root node of all node objects that need to be batch.
-     * Only sprites and label participate in the batch.
-     * Static batch must be enabled manually, otherwise dynamic batch is still used.
-     * Note: Do not place mask, Graphics, and objects such as UI models or particles under child nodes,
-     * otherwise rendering will be skipped after static batching is enabled.
-     *
-     * @zh
-     * UI 静态合批组件。
-     * 该组件放在所有需要被静态合批的节点对象的根节点上,子节点放置对象必须是精灵和文本,其余对象不参与静态合批。
-     * 用户必须通过手动方式启用收集静态合批数据[[markAsDirty]],否则合批方式仍然采用动态合批(采集数据的流程相同)。此后渲染的内容是采用收集到的合批渲染数据,子节点的任何修改将不再有效。
-     * 注意:子节点下不要放置 Mask,Graphics,以及 UI 模型或者粒子之类对象,否则会在启用完静态合批后跳过渲染。
-     *
-     * @deprecated Since v3.4.1, We have adopted a new rendering batching policy in v3.4.1,
-     * which will result in an effective performance improvement for normal dynamic batching components,
-     * so manual management with the UIStaticBatch component is no longer recommended and will be removed in the future
-     */
-    export class UIStaticBatch extends UIRenderer {
-        get color(): Readonly<math.Color>;
-        set color(value: Readonly<math.Color>);
-        get drawBatchList(): __private._cocos_2d_renderer_draw_batch__DrawBatch2D[];
-        protected _init: boolean;
-        protected _bufferAccessor: __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor | null;
-        protected _dirty: boolean;
-        postUpdateAssembler(render: __private._cocos_2d_renderer_i_batcher__IBatcher): void;
-        /**
-         * @en
-         * Recollect data tags.
-         * The render data will be recollected during the render phase of the current frame, and the next frame will be rendered using fixed data.
-         * Note: 尽量不要频繁调用此接口, 会有一定内存损耗.
-         *
-         * @zh
-         * 重新采集数据标记,会在当前帧的渲染阶段重新采集渲染数据,下一帧开始将会使用固定数据进行渲染。
-         * 注意:尽量不要频繁调用此接口,因为会清空原先存储的 ia 数据重新采集,会有一定内存损耗。
-         */
-        markAsDirty(): void;
-        /**
-         * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
-         */
-        _requireDrawBatch(): __private._cocos_2d_renderer_draw_batch__DrawBatch2D;
-        protected _clearData(): void;
-        protected _getBatcher(): UI | null;
-    }
-    /**
      * @en Shadow effect for Label component, only for system fonts or TTF fonts.
      * @zh 用于给 Label 组件添加阴影效果,只能用于系统字体或 ttf 字体。
      * @example
      * import { Node, Label, LabelShadow } from 'cc';
@@ -3582,10 +3537,8 @@
         protected _nativeObj: __private._cocos_2d_renderer_native_2d__NativeBatcher2d;
         get nativeObj(): __private._cocos_2d_renderer_native_2d__NativeBatcher2d;
         get currBufferAccessor(): __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
         get batches(): memop.CachedArray<__private._cocos_2d_renderer_draw_batch__DrawBatch2D>;
-        set currStaticRoot(value: UIStaticBatch | null);
-        set currIsStatic(value: boolean);
         device: gfx.Device;
         constructor(_root: Root);
         initialize(): boolean;
         destroy(): void;
@@ -3680,23 +3633,10 @@
          * @param model - The committed model
          * @param mat - The material used, could be null
          */
         commitModel(comp: UIMeshRenderer | UIRenderer, model: renderer.scene.Model | null, mat: Material | null): void;
-        setupStaticBatch(staticComp: UIStaticBatch, bufferAccessor: __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor): void;
-        endStaticBatch(): void;
         /**
          * @en
-         * Submit separate render data.
-         * This data does not participate in the batch.
-         *
-         * @zh
-         * 提交独立渲染数据.
-         * @param comp @en The UIStaticBatch component.
-         *             @zh 静态组件
-         */
-        commitStaticBatch(comp: UIStaticBatch): void;
-        /**
-         * @en
          * End a section of render data and submit according to the batch condition.
          *
          * @zh
          * 根据合批条件,结束一段渲染数据并提交。
@@ -59587,9 +59527,8 @@
             model: renderer.scene.Model | null;
             texture: gfx.Texture | null;
             sampler: gfx.Sampler | null;
             useLocalData: Node | null;
-            isStatic: boolean;
             textureHash: number;
             samplerHash: number;
             destroy(ui: _cocos_2d_renderer_i_batcher__IBatcher): void;
             clear(): void;
@@ -59597,10 +59536,8 @@
         }
         export interface _cocos_2d_renderer_i_batcher__IBatcher {
             currBufferAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
             readonly batches: memop.CachedArray<_cocos_2d_renderer_draw_batch__DrawBatch2D>;
-            currStaticRoot: UIStaticBatch | null;
-            currIsStatic: boolean;
             device: gfx.Device;
             initialize(): boolean;
             destroy(): any;
             addScreen(comp: RenderRoot2D): any;
@@ -59612,11 +59549,8 @@
             reset(): any;
             switchBufferAccessor(attributes?: gfx.Attribute[]): _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
             commitComp(comp: UIRenderer, renderData: BaseRenderData | null, frame: _cocos_asset_assets_texture_base__TextureBase | SpriteFrame | null, assembler: any, transform: Node | null): any;
             commitModel(comp: UIMeshRenderer | UIRenderer, model: renderer.scene.Model | null, mat: Material | null): any;
-            setupStaticBatch(staticComp: UIStaticBatch, bufferAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor): any;
-            endStaticBatch(): any;
-            commitStaticBatch(comp: UIStaticBatch): any;
             autoMergeBatches(renderComp?: UIRenderer): any;
             forceMergeBatches(material: Material, frame: _cocos_asset_assets_texture_base__TextureBase | SpriteFrame | null, renderComp: UIRenderer): any;
             finishMergeBatches(): any;
             flushMaterial(mat: Material): any;
@@ -72579,8 +72513,8 @@
     import { exoticAnimationTag, ExoticAnimation, additiveSettingsTag, AnimationClipAdditiveSettings } from "cc/editor/exotic-animation";
     import { EmbeddedPlayer, embeddedPlayerCountTag, getEmbeddedPlayersTag, addEmbeddedPlayerTag, removeEmbeddedPlayerTag, clearEmbeddedPlayersTag } from "cc/editor/embedded-player";
     import { AnimationMask, __private as ___private } from "cc/editor/new-gen-anim";
     import { CCON, TypedArrayData } from "cc/editor/serialization";
-    export { Canvas as CanvasComponent, UIRenderer as RenderComponent, UIRenderer as UIRenderable, UIRenderer as Renderable2D, UITransform as UITransformComponent, Mask as MaskComponent, RichText as RichTextComponent, Sprite as SpriteComponent, UIMeshRenderer as UIModelComponent, LabelOutline as LabelOutlineComponent, Graphics as GraphicsComponent, UIStaticBatch as UIStaticBatchComponent, UIOpacity as UIOpacityComponent, Label as LabelComponent, MeshRenderer as ModelComponent, DirectionalLight as DirectionalLightComponent, Light as LightComponent, SphereLight as SphereLightComponent, SpotLight as SpotLightComponent, SkinnedMeshRenderer as SkinningModelComponent, SkinnedMeshBatchRenderer as BatchedSkinningModelComponent, SkinnedMeshUnit as SkinningModelUnit, Animation as AnimationComponent, AudioSource as AudioSourceComponent, Node as BaseNode, Camera as CameraComponent, ModelRenderer as RenderableComponent, Billboard as BillboardComponent, Line as LineComponent, ParticleSystem as ParticleSystemComponent, SkeletalAnimation as SkeletalAnimationComponent, Button as ButtonComponent, EditBox as EditBoxComponent, Layout as LayoutComponent, ProgressBar as ProgressBarComponent, ScrollBar as ScrollBarComponent, ScrollView as ScrollViewComponent, Slider as SliderComponent, Toggle as ToggleComponent, ToggleContainer as ToggleContainerComponent, Widget as WidgetComponent, PageView as PageViewComponent, PageViewIndicator as PageViewIndicatorComponent, SafeArea as SafeAreaComponent, UICoordinateTracker as UICoordinateTrackerComponent, BlockInputEvents as BlockInputEventsComponent } from "cc";
+    export { Canvas as CanvasComponent, UIRenderer as RenderComponent, UIRenderer as UIRenderable, UIRenderer as Renderable2D, UITransform as UITransformComponent, Mask as MaskComponent, RichText as RichTextComponent, Sprite as SpriteComponent, UIMeshRenderer as UIModelComponent, LabelOutline as LabelOutlineComponent, Graphics as GraphicsComponent, UIOpacity as UIOpacityComponent, Label as LabelComponent, MeshRenderer as ModelComponent, DirectionalLight as DirectionalLightComponent, Light as LightComponent, SphereLight as SphereLightComponent, SpotLight as SpotLightComponent, SkinnedMeshRenderer as SkinningModelComponent, SkinnedMeshBatchRenderer as BatchedSkinningModelComponent, SkinnedMeshUnit as SkinningModelUnit, Animation as AnimationComponent, AudioSource as AudioSourceComponent, Node as BaseNode, Camera as CameraComponent, ModelRenderer as RenderableComponent, Billboard as BillboardComponent, Line as LineComponent, ParticleSystem as ParticleSystemComponent, SkeletalAnimation as SkeletalAnimationComponent, Button as ButtonComponent, EditBox as EditBoxComponent, Layout as LayoutComponent, ProgressBar as ProgressBarComponent, ScrollBar as ScrollBarComponent, ScrollView as ScrollViewComponent, Slider as SliderComponent, Toggle as ToggleComponent, ToggleContainer as ToggleContainerComponent, Widget as WidgetComponent, PageView as PageViewComponent, PageViewIndicator as PageViewIndicatorComponent, SafeArea as SafeAreaComponent, UICoordinateTracker as UICoordinateTrackerComponent, BlockInputEvents as BlockInputEventsComponent } from "cc";
     import { Details as _Details } from "cc";
     export {};
 }

@LinYunMo LinYunMo requested a review from SantyWang September 20, 2023 06:35
@LinYunMo LinYunMo requested a review from PPpro September 20, 2023 07:09
@SantyWang SantyWang merged commit 138feca into cocos:develop Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants