(!1714) dri3: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons, so use the new screen close notify hook instead. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									2070c4b596
								
							
						
					
					
						commit
						1ecd80dc59
					
				
							
								
								
									
										10
									
								
								dri3/dri3.c
								
								
								
								
							
							
						
						
									
										10
									
								
								dri3/dri3.c
								
								
								
								
							|  | @ -29,15 +29,11 @@ DevPrivateKeyRec dri3_screen_private_key; | |||
| 
 | ||||
| static int dri3_screen_generation; | ||||
| 
 | ||||
| static Bool | ||||
| dri3_close_screen(ScreenPtr screen) | ||||
| static void dri3_screen_close(ScreenPtr screen, void *arg) | ||||
| { | ||||
|     dri3_screen_priv_ptr screen_priv = dri3_screen_priv(screen); | ||||
| 
 | ||||
|     unwrap(screen_priv, screen, CloseScreen); | ||||
| 
 | ||||
|     dixScreenUnhookClose(screen, dri3_screen_close, NULL); | ||||
|     free(screen_priv); | ||||
|     return (*screen->CloseScreen) (screen); | ||||
| } | ||||
| 
 | ||||
| Bool | ||||
|  | @ -53,7 +49,7 @@ dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info) | |||
|         if (!screen_priv) | ||||
|             return FALSE; | ||||
| 
 | ||||
|         wrap(screen_priv, screen, CloseScreen, dri3_close_screen); | ||||
|         dixScreenHookClose(screen, dri3_screen_close, NULL); | ||||
| 
 | ||||
|         screen_priv->info = info; | ||||
| 
 | ||||
|  |  | |||
|  | @ -42,7 +42,6 @@ typedef struct dri3_dmabuf_format { | |||
| } dri3_dmabuf_format_rec, *dri3_dmabuf_format_ptr; | ||||
| 
 | ||||
| typedef struct dri3_screen_priv { | ||||
|     CloseScreenProcPtr          CloseScreen; | ||||
|     ConfigNotifyProcPtr         ConfigNotify; | ||||
| 
 | ||||
|     Bool                        formats_cached; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue