Skip to content

Is there a faster tft pixel draw? #6

@marcmerlin

Description

@marcmerlin

Hi again,

I'm working on bringing a big library of APIs on top of your work (to allow developing on PCs for faster speed and debugging).
I've already done the work with a fork of your lib that uses SDL, but it's an old fork of your work that is lacking serial support plus a lot of code you added, and I'd rather have is depend on X11 instead of SDL.
The SDL version does work well and fast, though, it writes to an emulated neopixel 1D array that gets rendered into a 2D SDL matrix: https://github.com/MarcFork/FastLEDonPc

My concern at this point is that all my code relies on a framebuffer that is stored in memory and synced to the hardware backend when matrix->show() is called.
The only way I knew how to implement this is by calling XWindow::drawPoint_RGB for every dot, in the matrix, but it is very slow (0.2sec for only 160x120 resolution). See:
https://github.com/marcmerlin/FastLED_TFTWrapper_GFX/blob/2a2de242054f227f603156139b5bbeed6197193a/FastLED_TFTWrapper_GFX.cpp#L28

Is there a better way to give a precomputed square matrix in RGB888 to Xwindow without calling the slow draw pixel, pixel by pixel?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions