earthlcd / ezLCD-5x

Public Repository for ezLCD-5035-RT release files system, firmware and issue reporting
https://earthlcd.com/products/ezlcd-5x?_pos=1&_sid=0927d2260&_ss=r
0 stars 1 forks source link

Overwriting pixels on screen via fill and print commands yields artifacts from previous screen contents #41

Closed microlan closed 2 years ago

microlan commented 2 years ago

Describe the bug If overwriting printed FreeType text (as an example) on the screen via drawing a box over the text to wipe the previous contents, randomly some artifacts will re-appear when the new text is printed.

To Reproduce Lua script- function LabelText_ON(XA, YA, XA1, YA1, BackColor, Text3) ez.ReplaceColor(XA, YA, XA1, YA1, 0x000000, 0xffffff) ez.SetXY(XA, YA) ez.SetColor(BackColor) ez.BoxFill(XA, YA, XA+XA1, YA+YA1) ez.SetXY(XA+5, YA-2) ez.SetFtFont(0, 25, 0) ez.SetColor(0x111111) print(Text3) end

while (1) do LabelText_ON(250, 400, 50, 25, 0x00ff00, "ON") ez.Wait_ms(1000) LabelText_ON(250, 400, 50, 25, 0xffffff, "OFF") ez.Wait_ms(1000) end

Expected behavior No artifacts/clear text

microlan commented 2 years ago

Caused by DCache not being flushed/invalidated prior to reading pixels from framebuffer. Fixed in 081022 or newer build.