(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
					
				
							
								
								
									
										39
									
								
								Xext/xvmc.c
								
								
								
								
							
							
						
						
									
										39
									
								
								Xext/xvmc.c
								
								
								
								
							|  | @ -667,27 +667,36 @@ ProcXvMCGetDRInfo(ClientPtr client) | |||
|     return Success; | ||||
| } | ||||
| 
 | ||||
| int (*ProcXvMCVector[xvmcNumRequest]) (ClientPtr) = { | ||||
| ProcXvMCQueryVersion, | ||||
|         ProcXvMCListSurfaceTypes, | ||||
|         ProcXvMCCreateContext, | ||||
|         ProcXvMCDestroyContext, | ||||
|         ProcXvMCCreateSurface, | ||||
|         ProcXvMCDestroySurface, | ||||
|         ProcXvMCCreateSubpicture, | ||||
|         ProcXvMCDestroySubpicture, | ||||
|         ProcXvMCListSubpictureTypes, ProcXvMCGetDRInfo}; | ||||
| 
 | ||||
| static int | ||||
| ProcXvMCDispatch(ClientPtr client) | ||||
| { | ||||
|     REQUEST(xReq); | ||||
| 
 | ||||
|     if (stuff->data < xvmcNumRequest) | ||||
|         return (*ProcXvMCVector[stuff->data]) (client); | ||||
|     else | ||||
|     switch (stuff->data) | ||||
|     { | ||||
|         case xvmc_QueryVersion: | ||||
|             return ProcXvMCQueryVersion(client); | ||||
|         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 | ||||
| SProcXvMCDispatch(ClientPtr client) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue