BRT Community
General Category => Discussion - EVE => Topic started by: Cyrilou on November 09, 2022, 03:35:14 PM
-
Hi,
I'm using ESD and sometimes fonts or ESD_images are truncated when I'm doing slide animations.
I've localized where is the problem:
In file Esd_Render_Bitmap.c:
void Esd_CoDl_Bitmap_Vertex(int16_t x, int16_t y, uint8_t handle, uint16_t cell)
{
EVE_HalContext *phost = Esd_GetHost();
if ((EVE_CHIPID >= EVE_FT810) && (x < 0 || y < 0 || x >= 512 || y >= 512))
{
EVE_CoDl_vertexFormat(phost, 0);
EVE_CoDl_bitmapHandle(phost, handle);
Esd_CoDl_PagedBitmapSource(handle, cell >> 7);
EVE_CoDl_cell(phost, cell & 0x7F);
EVE_CoCmd_dl(phost, VERTEX2F(x, y));
}
else
{
Esd_CoDl_PagedBitmapSource(handle, cell >> 7);
EVE_CoCmd_dl(phost, VERTEX2II(x, y, handle, cell));
}
}
When I comment VERTEX2II part of code, bitmap are not truncated, otherwise I loose bottom of the bitmap randomly with slide animations.
How can we explain this? Is something missing in dl commands?
-
Hello,
Thank you for your question.
Could you please let me know how large of a bitmap you are trying to place on the screen and at what screen position (X and Y value) you are placing it.
The VERTEX2II function can only render images to X=511 and Y=511 on the screen, so I suspect the code is dropping into the else section inadvertatnly.
Best Regards,
BRT Community
-
I have a screen of 480x272 i'm using a picture at x,y,h,w=4,10,36,36.
Screen is sliding of 240 to the left so only x is varying to -236.
-
The thing is why draw an element which is out of the screen?
if I draw only the visible part I have not the problem so I use vertex2ii
-
For fonts it's another problem that I must find.
-
Hello,
Are you displaying the image within a ESD Scroll Image?
What issue are you seeing with fonts? is this a built-in font or a custom font added to the project?
Best Regards,
BRT Community
-
It is a font added to the project. I'm using scroll panel but in a another screen. It's like a scissor would be applied on the font whereas i'm not using this.
As you see in attached, i'm using ESD label in linear layouts.
I have a main screen where font is used. When I slide the screen to the right a new screen that using scroll panel appears from the left, so at a moment font is displayed at the same time as scroll panel.
The slide is not done via scrool widget but with slide animations used by ev demo.
-
Hello,
I've attempted to recreate this behaviour in an ESD project btu haven't been successful currently.
Would you be able to share a cut down version of your application which shows this issue?
Best Regards,
BRT Community
-
Hi, no I can't.
Fonts and pictures can rarely but randomly be glitched. I've localized and reproduced the cause.
It's in file Esd_GpuAlloc.c. If I change address of an AllocEntries it corrupt font or picture in RAM_G (this is normal, but what is the cause?).
So it can be a pb in the algorithm of esd allocation or maybe ram overwrite in my app.
I've also set safe defragmentation macro added in v4.11 but this increase a lot chances to have glitches.
Safe defragmentation doesn't work for me.
I use also gradient widget which require alloc/dealloc when it is displayed/not displayed.
-
Hello,
Yes, from the screenshots previously provided it appears as if there may be an overwrite of assets happening in RAM_G.
If the address for the asset has been altered this will cause EVE to attempt to render the asset from the wrong RAM_G location. For example if you have a 100kB image file at RAM_G +0 and you move the allocation to RAM_G+500 the resulting display code will still attempt to render data from RAM_G+0 thus causing corruption in the image.
Do you still experience similar issue in ESD 4.15?
Best Regards,
BRT Community