dri2: Pass out_count by value to update_dri2_drawable_buffers()
update_dri2_drawable_buffers() doesn't modify out_count, so pass it by value. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
		
							parent
							
								
									93c833ee84
								
							
						
					
					
						commit
						b3d2164a03
					
				|  | @ -358,7 +358,7 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, | ||||||
| 
 | 
 | ||||||
| static void | static void | ||||||
| update_dri2_drawable_buffers(DRI2DrawablePtr pPriv, DrawablePtr pDraw, | update_dri2_drawable_buffers(DRI2DrawablePtr pPriv, DrawablePtr pDraw, | ||||||
| 			     DRI2BufferPtr *buffers, int *out_count, int *width, int *height) | 			     DRI2BufferPtr *buffers, int out_count, int *width, int *height) | ||||||
| { | { | ||||||
|     DRI2ScreenPtr   ds = DRI2GetScreen(pDraw->pScreen); |     DRI2ScreenPtr   ds = DRI2GetScreen(pDraw->pScreen); | ||||||
|     int i; |     int i; | ||||||
|  | @ -374,7 +374,7 @@ update_dri2_drawable_buffers(DRI2DrawablePtr pPriv, DrawablePtr pDraw, | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     pPriv->buffers = buffers; |     pPriv->buffers = buffers; | ||||||
|     pPriv->bufferCount = *out_count; |     pPriv->bufferCount = out_count; | ||||||
|     pPriv->width = pDraw->width; |     pPriv->width = pDraw->width; | ||||||
|     pPriv->height = pDraw->height; |     pPriv->height = pDraw->height; | ||||||
|     *width = pPriv->width; |     *width = pPriv->width; | ||||||
|  | @ -477,7 +477,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, | ||||||
| 
 | 
 | ||||||
|     *out_count = i; |     *out_count = i; | ||||||
| 
 | 
 | ||||||
|     update_dri2_drawable_buffers(pPriv, pDraw, buffers, out_count, width, height); |     update_dri2_drawable_buffers(pPriv, pDraw, buffers, *out_count, width, height); | ||||||
| 
 | 
 | ||||||
|     /* If the client is getting a fake front-buffer, pre-fill it with the
 |     /* If the client is getting a fake front-buffer, pre-fill it with the
 | ||||||
|      * contents of the real front-buffer.  This ensures correct operation of |      * contents of the real front-buffer.  This ensures correct operation of | ||||||
|  | @ -513,7 +513,7 @@ err_out: | ||||||
| 	buffers = NULL; | 	buffers = NULL; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     update_dri2_drawable_buffers(pPriv, pDraw, buffers, out_count, width, height); |     update_dri2_drawable_buffers(pPriv, pDraw, buffers, *out_count, width, height); | ||||||
| 
 | 
 | ||||||
|     return buffers; |     return buffers; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue