cancel
Showing results for 
Search instead for 
Did you mean: 

Let me tell the Designer to stop generating canvas buffers

JKaz.1
Associate III

Right now, if there are any widgets on a page the Designer automatically creates a canvas buffer for it.  The following code is created in the ViewBase .hpp/.cpp files

static const uint32_t CANVAS_BUFFER_SIZE = 12000;
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];

touchgfx::CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);

 

This gets set up for each view that has widgets.  I want it to STOP DOING THAT.  I want to allocate my own buffer to it, in a piece of ram that I choose.  Please, please, please give me the option to tell the Designer that I will handle it myself.

I can allocate my own buffer in the TouchGFXHAL::initialize() function, but it's just going to get overridden as soon as a View gets, as that constructor will set up it's own function.

This is especially important, because I have give it a buffer at the start of time anyways, otherwise it crashes.  When the view page is changed to, it calls StatusContainer, which calls an IconContainer, which sets the tint of the icon.  Setting the tint calls VectorRenderer->draw, which is going to use the CanvasBuffer.
Only after all of this is done, is the constructor for ViewBase hit, and the canvas buffer for the page get's initialized.

So, not only am I forced to use the canvas buffer of the page, it is setup too late to actually be useful for that page at initialization time.  Seems like a double flaw.

0 REPLIES 0