(1626) Xext: xvmc: simplify dispatcher
The dispatcher functions are much more complex than they're usually are (just switch/case statement). Bring them in line with the standard scheme used in the Xserver, so further steps become easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									7a706b5e1e
								
							
						
					
					
						commit
						7a64dadeb8
					
				
							
								
								
									
										41
									
								
								Xext/xvmc.c
								
								
								
								
							
							
						
						
									
										41
									
								
								Xext/xvmc.c
								
								
								
								
							|  | @ -667,26 +667,35 @@ ProcXvMCGetDRInfo(ClientPtr client) | ||||||
|     return Success; |     return Success; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int (*ProcXvMCVector[xvmcNumRequest]) (ClientPtr) = { |  | ||||||
| ProcXvMCQueryVersion, |  | ||||||
|         ProcXvMCListSurfaceTypes, |  | ||||||
|         ProcXvMCCreateContext, |  | ||||||
|         ProcXvMCDestroyContext, |  | ||||||
|         ProcXvMCCreateSurface, |  | ||||||
|         ProcXvMCDestroySurface, |  | ||||||
|         ProcXvMCCreateSubpicture, |  | ||||||
|         ProcXvMCDestroySubpicture, |  | ||||||
|         ProcXvMCListSubpictureTypes, ProcXvMCGetDRInfo}; |  | ||||||
| 
 |  | ||||||
| static int | static int | ||||||
| ProcXvMCDispatch(ClientPtr client) | ProcXvMCDispatch(ClientPtr client) | ||||||
| { | { | ||||||
|     REQUEST(xReq); |     REQUEST(xReq); | ||||||
| 
 |     switch (stuff->data) | ||||||
|     if (stuff->data < xvmcNumRequest) |     { | ||||||
|         return (*ProcXvMCVector[stuff->data]) (client); |         case xvmc_QueryVersion: | ||||||
|     else |             return ProcXvMCQueryVersion(client); | ||||||
|         return BadRequest; |         case xvmc_ListSurfaceTypes: | ||||||
|  |             return ProcXvMCListSurfaceTypes(client); | ||||||
|  |         case xvmc_CreateContext: | ||||||
|  |             return ProcXvMCCreateContext(client); | ||||||
|  |         case xvmc_DestroyContext: | ||||||
|  |             return ProcXvMCDestroyContext(client); | ||||||
|  |         case xvmc_CreateSurface: | ||||||
|  |             return ProcXvMCCreateSurface(client); | ||||||
|  |         case xvmc_DestroySurface: | ||||||
|  |             return ProcXvMCDestroySurface(client); | ||||||
|  |         case xvmc_CreateSubpicture: | ||||||
|  |             return ProcXvMCCreateSubpicture(client); | ||||||
|  |         case xvmc_DestroySubpicture: | ||||||
|  |             return ProcXvMCDestroySubpicture(client); | ||||||
|  |         case xvmc_ListSubpictureTypes: | ||||||
|  |             return ProcXvMCListSubpictureTypes(client); | ||||||
|  |         case xvmc_GetDRInfo: | ||||||
|  |             return ProcXvMCGetDRInfo(client); | ||||||
|  |         default: | ||||||
|  |             return BadRequest; | ||||||
|  |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int _X_COLD | static int _X_COLD | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue