mirror of
				https://github.com/edubart/otclient.git
				synced 2025-10-31 10:46:24 +01:00 
			
		
		
		
	improve map framebuffer clear
This commit is contained in:
		| @@ -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(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Eduardo Bart
					Eduardo Bart