Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 27, 2025

Implements a Panel lazy redraw cache and expands the widget performance plan. Panel now caches its masked layer, reuses putimage_withalpha when clean, and uses a unified markDirty plus a short redraw window (~80 frames) to cover interaction-driven animations. Documentation keeps the broader optimization plan.

Changes Made

  • Added cached masked layer for Panel and reuse via putimage_withalpha; only regenerate mask on geometry/scale changes.
  • Unified dirty marking (markDirty) across size/scale/layout/event updates; maintained a limited redraw window for animations.
  • Documented the redraw window rationale in code comments; performance plan doc unchanged aside from earlier additions.

Testing

  • Not run (EGE/Windows-dependent environment).
Original prompt

仔细阅读Widget相关实现。现在的绘制性能不好,请理解各种逻辑,找一些解决方案,并给出方案,先不实施


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 27, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Copilot AI changed the title [WIP] Review widget implementation and suggest performance improvements Document widget rendering performance improvement plan Dec 27, 2025
Copilot AI requested a review from FeJS8888 December 27, 2025 08:31
@FeJS8888
Copy link
Owner

@copilot 由于putimage_withalpha的开销小于alphafliter,所以panel应当懒标记,进行优化,对于懒标记处理可以类似Button等

Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 27, 2025

@copilot 由于putimage_withalpha的开销小于alphafliter,所以panel应当懒标记,进行优化,对于懒标记处理可以类似Button等

已在 docs/Widget_Performance_Plan.md 加入 Panel 懒标记与缓存复用方案,明确优先用 putimage_withalpha 重用遮罩层,必要时才用 alphafilter(66e66ed)。本次仅文档更新,无界面改动可截图。

Copilot AI and others added 3 commits December 27, 2025 09:06
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
@FeJS8888
Copy link
Owner

@copilot 依据此,先优化Panel的懒标记

Copilot AI and others added 5 commits December 27, 2025 11:47
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Co-authored-by: FeJS8888 <110683147+FeJS8888@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 27, 2025

@copilot 依据此,先优化Panel的懒标记

已实现 Panel 懒标记与缓存:生成遮罩后的 cachedLayer,后续直接 putimage_withalpha 复用;所有尺寸/布局/事件更新统一 markDirty,交互后保持 ~80 帧自动重绘窗口以覆盖波纹等动画(ad6d2a4)。本次为渲染逻辑更新,无新增界面截图。

Copilot AI changed the title Document widget rendering performance improvement plan Add Panel lazy redraw cache and document widget performance plan Dec 27, 2025
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.

2 participants