Skip to content

refactor: add RTTI-free renderer extension core#407

Open
forntoh wants to merge 2 commits intofeat/graphical-displayfrom
gd/02-rtti-free-extension-core
Open

refactor: add RTTI-free renderer extension core#407
forntoh wants to merge 2 commits intofeat/graphical-displayfrom
gd/02-rtti-free-extension-core

Conversation

@forntoh
Copy link
Copy Markdown
Owner

@forntoh forntoh commented Apr 3, 2026

Summary

  • Add RTTI-free extension hooks to core renderer/item APIs via MenuRenderer::queryExtension() and MenuItem::queryCapability().
  • Introduce optional extension interfaces for frame lifecycle and graphical context/capabilities (FrameLifecycleRenderer, GraphicalRendererContext, GraphicalMenuItem) without adding pixel-specific methods to base classes.
  • Wire frame lifecycle hooks into menu flow: MenuScreen::draw() calls beginFrame() and LcdMenu now calls endFrame() after handled draw-triggering actions (setScreen, show, refresh, handled process).
  • Add unit tests verifying frame flush behavior on refresh() and handled process() commands.
  • Document the extension model in rendering docs.

Verification

  • Attempted to run Arduino unit tests locally (bundle exec arduino_ci.rb --skip-examples-compilation), but local Ruby gem install requires privileged system paths on this machine.
  • Performed static diff review and kept PR scope to extension-core + unit tests + docs only.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6e535563-b07f-4a65-afa4-5c19a688b500

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gd/02-rtti-free-extension-core

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Memory usage change @ b86a846

Board flash % RAM for global variables %
STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 🔺 +124 - +176 +0.19 - +0.27 0 - 0 0.0 - 0.0
arduino:avr:uno 🔺 +162 - +188 +0.5 - +0.58 🔺 +10 - +34 +0.49 - +1.66
arduino:samd:mkr1000 🔺 +132 - +180 +0.05 - +0.07 0 - 0 0.0 - 0.0
esp32:esp32:esp32 🔺 +176 - +232 +0.01 - +0.02 0 - 0 0.0 - 0.0
esp8266:esp8266:huzzah N/A N/A N/A N/A
Click for full report table
Board examples/Basic
flash
% examples/Basic
RAM for global variables
% examples/ButtonAdapter
flash
% examples/ButtonAdapter
RAM for global variables
% examples/Callbacks
flash
% examples/Callbacks
RAM for global variables
% examples/InputRotary
flash
% examples/InputRotary
RAM for global variables
% examples/IntFloatValues
flash
% examples/IntFloatValues
RAM for global variables
% examples/KeyboardAdapter
flash
% examples/KeyboardAdapter
RAM for global variables
% examples/List
flash
% examples/List
RAM for global variables
% examples/SimpleRotary
flash
% examples/SimpleRotary
RAM for global variables
% examples/SSD1803A_I2C
flash
% examples/SSD1803A_I2C
RAM for global variables
% examples/UseByRef
flash
% examples/UseByRef
RAM for global variables
% examples/DynamicMenu
flash
% examples/DynamicMenu
RAM for global variables
% examples/Widgets
flash
% examples/Widgets
RAM for global variables
% examples/RTOS
flash
% examples/RTOS
RAM for global variables
%
STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 124 0.19 0 0.0 128 0.2 0 0.0 128 0.2 0 0.0 160 0.24 0 0.0 144 0.22 0 0.0 128 0.2 0 0.0 144 0.22 0 0.0 152 0.23 0 0.0 124 0.19 0 0.0 176 0.27 0 0.0 156 0.24 0 0.0 136 0.21 0 0.0
arduino:avr:uno 162 0.5 10 0.49 162 0.5 12 0.59 164 0.51 12 0.59 188 0.58 16 0.78 172 0.53 20 0.98 164 0.51 12 0.59 170 0.53 18 0.88 172 0.53 22 1.07 162 0.5 10 0.49 186 0.58 34 1.66 188 0.58 14 0.68 170 0.53 18 0.88 168 0.52 16 0.78
arduino:samd:mkr1000 132 0.05 0 0.0 140 0.05 0 0.0 136 0.05 0 0.0 164 0.06 0 0.0 152 0.06 0 0.0 136 0.05 0 0.0 148 0.06 0 0.0 156 0.06 0 0.0 132 0.05 0 0.0 180 0.07 0 0.0 156 0.06 0 0.0 148 0.06 0 0.0
esp32:esp32:esp32 184 0.01 0 0.0 180 0.01 0 0.0 180 0.01 0 0.0 204 0.02 0 0.0 200 0.02 0 0.0 176 0.01 0 0.0 216 0.02 0 0.0 208 0.02 0 0.0 184 0.01 0 0.0 232 0.02 0 0.0 212 0.02 0 0.0 204 0.02 0 0.0 196 0.01 0 0.0
esp8266:esp8266:huzzah N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/Basic<br>flash,%,examples/Basic<br>RAM for global variables,%,examples/ButtonAdapter<br>flash,%,examples/ButtonAdapter<br>RAM for global variables,%,examples/Callbacks<br>flash,%,examples/Callbacks<br>RAM for global variables,%,examples/InputRotary<br>flash,%,examples/InputRotary<br>RAM for global variables,%,examples/IntFloatValues<br>flash,%,examples/IntFloatValues<br>RAM for global variables,%,examples/KeyboardAdapter<br>flash,%,examples/KeyboardAdapter<br>RAM for global variables,%,examples/List<br>flash,%,examples/List<br>RAM for global variables,%,examples/SimpleRotary<br>flash,%,examples/SimpleRotary<br>RAM for global variables,%,examples/SSD1803A_I2C<br>flash,%,examples/SSD1803A_I2C<br>RAM for global variables,%,examples/UseByRef<br>flash,%,examples/UseByRef<br>RAM for global variables,%,examples/DynamicMenu<br>flash,%,examples/DynamicMenu<br>RAM for global variables,%,examples/Widgets<br>flash,%,examples/Widgets<br>RAM for global variables,%,examples/RTOS<br>flash,%,examples/RTOS<br>RAM for global variables,%
STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8,124,0.19,0,0.0,128,0.2,0,0.0,128,0.2,0,0.0,160,0.24,0,0.0,144,0.22,0,0.0,128,0.2,0,0.0,144,0.22,0,0.0,152,0.23,0,0.0,124,0.19,0,0.0,176,0.27,0,0.0,156,0.24,0,0.0,136,0.21,0,0.0
arduino:avr:uno,162,0.5,10,0.49,162,0.5,12,0.59,164,0.51,12,0.59,188,0.58,16,0.78,172,0.53,20,0.98,164,0.51,12,0.59,170,0.53,18,0.88,172,0.53,22,1.07,162,0.5,10,0.49,186,0.58,34,1.66,188,0.58,14,0.68,170,0.53,18,0.88,168,0.52,16,0.78
arduino:samd:mkr1000,132,0.05,0,0.0,140,0.05,0,0.0,136,0.05,0,0.0,164,0.06,0,0.0,152,0.06,0,0.0,136,0.05,0,0.0,148,0.06,0,0.0,156,0.06,0,0.0,132,0.05,0,0.0,180,0.07,0,0.0,156,0.06,0,0.0,148,0.06,0,0.0,,,,
esp32:esp32:esp32,184,0.01,0,0.0,180,0.01,0,0.0,180,0.01,0,0.0,204,0.02,0,0.0,200,0.02,0,0.0,176,0.01,0,0.0,216,0.02,0,0.0,208,0.02,0,0.0,184,0.01,0,0.0,232,0.02,0,0.0,212,0.02,0,0.0,204,0.02,0,0.0,196,0.01,0,0.0
esp8266:esp8266:huzzah,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,,,,

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.

1 participant