2019-09-10 12:38 AM
I am using touchgfx to draw a sine line.I have two questions.
This is what I drawed using touchgfx simulator.
First question:
It looks like somewhere of the line is in light color, I don't konw why? Can it be fixed?
This is the drawing using memeory . The CWR using memory is keeping growing.
I set the canvas buffer size 32767 which is the largest number.It still is not enough.
If I draw some complext line ,it will be a disaster...
So the second question:
How can I draw line with smallest memory?
Best regards for answering. Thanks...
Solved! Go to Solution.
2019-09-13 01:51 AM
It's not actually using this memory size. The console says "requires" which means it's recommended for optimal performance. We do not allocate dynamically in touchgfx. Maybe the description could be improved a bit since you find it confusing =)
If you get this sort of output it just means we'll do more passes at the cost of performance because your "canvas buffer" is too small for the best performance, but performance may still be acceptable to you.
In essence: Set the size of the buffer you're happy with or can afford. Evaluate the performance of the graph. If it's a happy m@rriage then you're done.
/Martin
2019-09-13 01:51 AM
It's not actually using this memory size. The console says "requires" which means it's recommended for optimal performance. We do not allocate dynamically in touchgfx. Maybe the description could be improved a bit since you find it confusing =)
If you get this sort of output it just means we'll do more passes at the cost of performance because your "canvas buffer" is too small for the best performance, but performance may still be acceptable to you.
In essence: Set the size of the buffer you're happy with or can afford. Evaluate the performance of the graph. If it's a happy m@rriage then you're done.
/Martin
2019-09-17 01:16 AM
Thanks for your reply. You are completely right. I tried smaller canvas buffer, it can still work. But it will take a longger time to draw.
I also found out why it is in light color. Because it is using Rasterizer to draw , which is based on "The Lightweight Rasterizer" .
If someone use it should be careful.