glamor: return status from `glamor_set_pixmap_texture()`
Chnage the API for `glamor_set_pixmap_texture()` to return a status, so that the caller can know whether it succeeded or not. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
		
							parent
							
								
									fc6380a11b
								
							
						
					
					
						commit
						9e37e41fa7
					
				| 
						 | 
					@ -99,7 +99,7 @@ glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type)
 | 
				
			||||||
    glamor_init_pixmap_private_small(pixmap, pixmap_priv);
 | 
					    glamor_init_pixmap_private_small(pixmap, pixmap_priv);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_X_EXPORT void
 | 
					_X_EXPORT Bool
 | 
				
			||||||
glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
 | 
					glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    ScreenPtr screen = pixmap->drawable.pScreen;
 | 
					    ScreenPtr screen = pixmap->drawable.pScreen;
 | 
				
			||||||
| 
						 | 
					@ -121,10 +121,12 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (fbo == NULL) {
 | 
					    if (fbo == NULL) {
 | 
				
			||||||
        ErrorF("XXX fail to create fbo.\n");
 | 
					        ErrorF("XXX fail to create fbo.\n");
 | 
				
			||||||
        return;
 | 
					        return FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    glamor_pixmap_attach_fbo(pixmap, fbo);
 | 
					    glamor_pixmap_attach_fbo(pixmap, fbo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint32_t
 | 
					uint32_t
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -110,7 +110,7 @@ extern _X_EXPORT Bool glamor_close_screen(ScreenPtr screen);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern _X_EXPORT uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap);
 | 
					extern _X_EXPORT uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern _X_EXPORT void glamor_set_pixmap_texture(PixmapPtr pixmap,
 | 
					extern _X_EXPORT Bool glamor_set_pixmap_texture(PixmapPtr pixmap,
 | 
				
			||||||
                                                unsigned int tex);
 | 
					                                                unsigned int tex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap,
 | 
					extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue