Skip to content

Improve framebuffer handling on Zephyr - #34

Open
dani-clo wants to merge 1 commit into
arduino-libraries:mainfrom
dani-clo:video_api_giga
Open

dani-clo wants to merge 1 commit into
arduino-libraries:mainfrom
dani-clo:video_api_giga

Conversation

@dani-clo

Copy link
Copy Markdown
Contributor

Respect the native display dimensions when not rotated.

Clear all LTDC framebuffers during initialization.

Add getDrawBuffer() to access a non-displayed RGB565 framebuffer when available, without exposing LTDC-specific details.

This allows users to render directly into the framebuffer and display the result without additional copies:

auto *dst = static_cast<uint16_t *>(Display.getDrawBuffer());
// Render directly into the destination buffer
Display.drawBuffer(0, 0, dst);

Respect portrait dimensions, clear framebuffers during begin(), and add
getDrawBuffer() for drawing without exposing LTDC details.
@github-actions

Copy link
Copy Markdown

Memory usage change @ 3f712e3

Board flash % RAM for global variables %
arduino:zephyr_main:giga 🔺 +124 - +208 +0.01 - +0.02 🔺 +56 - +88 +0.02 - +0.03
arduino:zephyr_main:portentah7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/ArduinoLogo
flash
% examples/ArduinoLogo
RAM for global variables
% examples/ArduinoLogoDrawing
flash
% examples/ArduinoLogoDrawing
RAM for global variables
% examples/LVGLDemo
flash
% examples/LVGLDemo
RAM for global variables
%
arduino:zephyr_main:giga 124 0.01 56 0.02 124 0.01 56 0.02 208 0.02 88 0.03
arduino:zephyr_main:portentah7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/ArduinoLogo<br>flash,%,examples/ArduinoLogo<br>RAM for global variables,%,examples/ArduinoLogoDrawing<br>flash,%,examples/ArduinoLogoDrawing<br>RAM for global variables,%,examples/LVGLDemo<br>flash,%,examples/LVGLDemo<br>RAM for global variables,%
arduino:zephyr_main:giga,124,0.01,56,0.02,124,0.01,56,0.02,208,0.02,88,0.03
arduino:zephyr_main:portentah7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

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