improve map framebuffer clear
This commit is contained in:
parent
79b4136a8d
commit
c4693fb7b9
|
@ -80,7 +80,11 @@ void MapView::draw(const Rect& rect)
|
|||
|
||||
if(m_mustCleanFramebuffer) {
|
||||
Rect clearRect = Rect(0, 0, m_drawDimension * m_tileSize);
|
||||
m_framebuffer->clear(Color::black, clearRect);
|
||||
|
||||
// drawing a black rect is actually faster than FrameBuffer::clear()
|
||||
g_painter.setColor(Color::black);
|
||||
g_painter.drawFilledRect(clearRect);
|
||||
g_painter.setColor(Color::white);
|
||||
}
|
||||
|
||||
auto it = m_cachedVisibleTiles.begin();
|
||||
|
|
Loading…
Reference in New Issue