present: Report damage when flipping
Limit damage to the 'update' region. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
		
							parent
							
								
									5cf12c9569
								
							
						
					
					
						commit
						653d33941b
					
				| 
						 | 
					@ -520,6 +520,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
 | 
				
			||||||
            /* Try to flip
 | 
					            /* Try to flip
 | 
				
			||||||
             */
 | 
					             */
 | 
				
			||||||
            if (present_flip(vblank->crtc, vblank->event_id, vblank->target_msc, vblank->pixmap, vblank->sync_flip)) {
 | 
					            if (present_flip(vblank->crtc, vblank->event_id, vblank->target_msc, vblank->pixmap, vblank->sync_flip)) {
 | 
				
			||||||
 | 
					                RegionPtr damage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                /* Fix window pixmaps:
 | 
					                /* Fix window pixmaps:
 | 
				
			||||||
                 *  1) Restore previous flip window pixmap
 | 
					                 *  1) Restore previous flip window pixmap
 | 
				
			||||||
| 
						 | 
					@ -530,6 +531,16 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
 | 
				
			||||||
                                               (*screen->GetScreenPixmap)(screen));
 | 
					                                               (*screen->GetScreenPixmap)(screen));
 | 
				
			||||||
                (*screen->SetWindowPixmap)(vblank->window, vblank->pixmap);
 | 
					                (*screen->SetWindowPixmap)(vblank->window, vblank->pixmap);
 | 
				
			||||||
                (*screen->SetWindowPixmap)(screen->root, vblank->pixmap);
 | 
					                (*screen->SetWindowPixmap)(screen->root, vblank->pixmap);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                /* Report update region as damaged
 | 
				
			||||||
 | 
					                 */
 | 
				
			||||||
 | 
					                if (vblank->update) {
 | 
				
			||||||
 | 
					                    damage = vblank->update;
 | 
				
			||||||
 | 
					                    RegionIntersect(damage, damage, &window->clipList);
 | 
				
			||||||
 | 
					                } else
 | 
				
			||||||
 | 
					                    damage = &window->clipList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                DamageDamageRegion(&vblank->window->drawable, damage);
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue