mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:42:44 +00:00 
			
		
		
		
	Rework the rendering model so that clients instantiate backing stores.
This makes interactive resizing work a lot better, althought it's still not perfect. There are still glitches and unpleasant flashes of zeroed memory.
This commit is contained in:
		
							parent
							
								
									e0b81ee4c9
								
							
						
					
					
						commit
						fa02d2a39b
					
				
					 17 changed files with 185 additions and 46 deletions
				
			
		|  | @ -36,18 +36,13 @@ void WSWindow::set_title(String&& title) | |||
| void WSWindow::set_rect(const Rect& rect) | ||||
| { | ||||
|     Rect old_rect; | ||||
|     if (!m_client && !m_menu) | ||||
|         return; | ||||
|     ASSERT(m_client || m_menu); | ||||
|     if (m_rect == rect) | ||||
|         return; | ||||
|     old_rect = m_rect; | ||||
|     m_rect = rect; | ||||
|     if (!m_backing || old_rect.size() != rect.size()) { | ||||
|         if (m_menu) | ||||
|             m_backing = GraphicsBitmap::create(GraphicsBitmap::Format::RGB32, m_rect.size()); | ||||
|         else if (m_client) { | ||||
|             m_backing = m_client->create_shared_bitmap(m_has_alpha_channel ? GraphicsBitmap::Format::RGBA32 : GraphicsBitmap::Format::RGB32, m_rect.size()); | ||||
|         } | ||||
|     if (m_menu && (!m_backing_store || old_rect.size() != rect.size())) { | ||||
|         m_backing_store = GraphicsBitmap::create(GraphicsBitmap::Format::RGB32, m_rect.size()); | ||||
|     } | ||||
|     WSWindowManager::the().notify_rect_changed(*this, old_rect, rect); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling