mirror of
https://github.com/edubart/otclient.git
synced 2025-05-01 01:59:21 +02:00
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) {
|
if(m_mustCleanFramebuffer) {
|
||||||
Rect clearRect = Rect(0, 0, m_drawDimension * m_tileSize);
|
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();
|
auto it = m_cachedVisibleTiles.begin();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user