improve map framebuffer clear

This commit is contained in:
Eduardo Bart 2012-04-04 18:53:10 -03:00
parent 79b4136a8d
commit c4693fb7b9
1 changed files with 5 additions and 1 deletions

View File

@ -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();