EFIAPI\r
LcdGraphicsBlt (\r
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
- IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
- IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
- IN UINTN SourceX,\r
- IN UINTN SourceY,\r
- IN UINTN DestinationX,\r
- IN UINTN DestinationY,\r
- IN UINTN Width,\r
- IN UINTN Height,\r
- IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer\r
+ IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
+ IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
+ IN UINTN SourceX,\r
+ IN UINTN SourceY,\r
+ IN UINTN DestinationX,\r
+ IN UINTN DestinationY,\r
+ IN UINTN Width,\r
+ IN UINTN Height,\r
+ IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer\r
)\r
{\r
- EFI_STATUS Status;\r
- UINT32 HorizontalResolution;\r
+ EFI_STATUS Status;\r
+ UINT32 HorizontalResolution;\r
UINT32 VerticalResolution;\r
- LCD_INSTANCE* Instance;\r
+ LCD_INSTANCE* Instance;\r
\r
Instance = LCD_INSTANCE_FROM_GOP_THIS(This);\r
\r
BltOperation,DestinationX,DestinationY,Width,Height,HorizontalResolution,VerticalResolution));\r
\r
// Check we have reasonable parameters\r
- if (Width == 0 || Height == 0) {\r
+ if (Width == 0 || Height == 0) {\r
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid dimension: Zero size area.\n" ));\r
- Status = EFI_INVALID_PARAMETER;\r
- goto EXIT;\r
- }\r
-\r
- if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToBltBuffer)) {\r
- ASSERT( BltBuffer != NULL);\r
- }\r
-\r
- /*if ((DestinationX >= HorizontalResolution) || (DestinationY >= VerticalResolution)) {\r
- DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid destination.\n" ));\r
- Status = EFI_INVALID_PARAMETER;\r
- goto EXIT;\r
- }*/\r
-\r
- // If we are reading data out of the video buffer, check that the source area is within the display limits\r
- if ((BltOperation == EfiBltVideoToBltBuffer) || (BltOperation == EfiBltVideoToVideo)) {\r
+ Status = EFI_INVALID_PARAMETER;\r
+ goto EXIT;\r
+ }\r
+\r
+ if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToBltBuffer)) {\r
+ ASSERT( BltBuffer != NULL);\r
+ }\r
+\r
+ /*if ((DestinationX >= HorizontalResolution) || (DestinationY >= VerticalResolution)) {\r
+ DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid destination.\n" ));\r
+ Status = EFI_INVALID_PARAMETER;\r
+ goto EXIT;\r
+ }*/\r
+\r
+ // If we are reading data out of the video buffer, check that the source area is within the display limits\r
+ if ((BltOperation == EfiBltVideoToBltBuffer) || (BltOperation == EfiBltVideoToVideo)) {\r
if ((SourceY + Height > VerticalResolution) || (SourceX + Width > HorizontalResolution)) {\r
DEBUG((DEBUG_INFO, "LcdGraphicsBlt: ERROR - Invalid source resolution.\n" ));\r
DEBUG((DEBUG_INFO, " - SourceY=%d + Height=%d > VerticalResolution=%d.\n", SourceY, Height, VerticalResolution ));\r
Status = EFI_INVALID_PARAMETER;\r
goto EXIT;\r
}\r
- }\r
+ }\r
\r
- // If we are writing data into the video buffer, that the destination area is within the display limits\r
- if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToVideo)) {\r
+ // If we are writing data into the video buffer, that the destination area is within the display limits\r
+ if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToVideo)) {\r
if ((DestinationY + Height > VerticalResolution) || (DestinationX + Width > HorizontalResolution)) {\r
DEBUG((DEBUG_INFO, "LcdGraphicsBlt: ERROR - Invalid destination resolution.\n" ));\r
DEBUG((DEBUG_INFO, " - DestinationY=%d + Height=%d > VerticalResolution=%d.\n", DestinationY, Height, VerticalResolution ));\r
Status = EFI_INVALID_PARAMETER;\r
goto EXIT;\r
}\r
- }\r
+ }\r
\r
//\r
// Perform the Block Transfer Operation\r
//\r
\r
- switch (BltOperation) {\r
- case EfiBltVideoFill:\r
- Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
- break;\r
+ switch (BltOperation) {\r
+ case EfiBltVideoFill:\r
+ Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
+ break;\r
\r
- case EfiBltVideoToBltBuffer:\r
- Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
+ case EfiBltVideoToBltBuffer:\r
+ Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
break;\r
\r
case EfiBltBufferToVideo:\r
Status = BltBufferToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
- break;\r
+ break;\r
\r
- case EfiBltVideoToVideo:\r
- Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
- break;\r
+ case EfiBltVideoToVideo:\r
+ Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
+ break;\r
\r
- case EfiGraphicsOutputBltOperationMax:\r
- default:\r
- DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n"));\r
- Status = EFI_INVALID_PARAMETER;\r
- break;\r
- }\r
+ case EfiGraphicsOutputBltOperationMax:\r
+ default:\r
+ DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n"));\r
+ Status = EFI_INVALID_PARAMETER;\r
+ break;\r
+ }\r
\r
EXIT:\r
- return Status;\r
+ return Status;\r
}\r