Skip to content

Commit dc6d194

Browse files
committed
perf(map): eliminate beige flash on nav scroll by deferring sprite clear to render task
1 parent 200ba41 commit dc6d194

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/maps/src/maps.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,9 @@ void Maps::mapRenderTask(void* pvParameters)
595595
continue;
596596
}
597597

598+
if (instance->mapTempSprite.getBuffer())
599+
instance->mapTempSprite.fillSprite(0xF7BE);
600+
598601
instance->placedLabelsCache.clear();
599602
instance->mapTempSprite.startWrite();
600603
uint32_t lastYield = millis();
@@ -1569,7 +1572,6 @@ bool Maps::renderNavViewport(float centerLat, float centerLon, uint8_t zoom, TFT
15691572
navLastZoom_ = zoom;
15701573
if (xSemaphoreTakeRecursive(mapMutex, pdMS_TO_TICKS(200)) == pdTRUE)
15711574
{
1572-
map.fillSprite(0xF7BE);
15731575
redrawMap = true;
15741576
pendingTiles.clear();
15751577
if (tilesGrid == 3)

0 commit comments

Comments
 (0)