+ //\r
+ // Re-initialize the frame buffer configure when mode changes.\r
+ //\r
+ Status = FrameBufferBltConfigure (\r
+ (VOID*) (UINTN) This->Mode->FrameBufferBase,\r
+ This->Mode->Info,\r
+ Private->FrameBufferBltConfigure,\r
+ &Private->FrameBufferBltConfigureSize\r
+ );\r
+ if (Status == RETURN_BUFFER_TOO_SMALL) {\r
+ //\r
+ // Frame buffer configure may be larger in new mode.\r
+ //\r
+ if (Private->FrameBufferBltConfigure != NULL) {\r
+ FreePool (Private->FrameBufferBltConfigure);\r
+ }\r
+ Private->FrameBufferBltConfigure =\r
+ AllocatePool (Private->FrameBufferBltConfigureSize);\r
+ ASSERT (Private->FrameBufferBltConfigure != NULL);\r
+\r
+ //\r
+ // Create the configuration for FrameBufferBltLib\r
+ //\r
+ Status = FrameBufferBltConfigure (\r
+ (VOID*) (UINTN) This->Mode->FrameBufferBase,\r
+ This->Mode->Info,\r
+ Private->FrameBufferBltConfigure,\r
+ &Private->FrameBufferBltConfigureSize\r
+ );\r
+ }\r
+ ASSERT (Status == RETURN_SUCCESS);\r
+\r
+ //\r
+ // Per UEFI Spec, need to clear the visible portions of the output display to black.\r
+ //\r
+ ZeroMem (&Black, sizeof (Black));\r
+ Status = FrameBufferBlt (\r
+ Private->FrameBufferBltConfigure,\r
+ &Black,\r
+ EfiBltVideoFill,\r
+ 0, 0,\r
+ 0, 0,\r
+ This->Mode->Info->HorizontalResolution, This->Mode->Info->VerticalResolution,\r
+ 0\r
+ );\r
+ ASSERT_RETURN_ERROR (Status);\r