/* Backup function for HBufferImage. Only a few fields need to be backup. This is for making the file buffer refresh as few as possible. */
EFI_STATUS HBufferImageBackup(VOID)
/* Backup function for HBufferImage. Only a few fields need to be backup. This is for making the file buffer refresh as few as possible. */
EFI_STATUS HBufferImageBackup(VOID)
{
  HBufferImageBackupVar.MousePosition = HBufferImage.MousePosition;
  HBufferImageBackupVar.BufferPosition = HBufferImage.BufferPosition;
  HBufferImageBackupVar.Modified = HBufferImage.Modified;
  HBufferImageBackupVar.BufferType    = HBufferImage.BufferType;
  HBufferImageBackupVar.LowVisibleRow = HBufferImage.LowVisibleRow;
  HBufferImageBackupVar.HighBits      = HBufferImage.HighBits;
  switch (HBufferImage.BufferType) {
    case FileTypeFileBuffer:
      HFileImageBackup ();
      break;
    case FileTypeDiskBuffer:
      HDiskImageBackup ();
      break;
    case FileTypeMemBuffer:
      HMemImageBackup ();
      break;
    default:
      break;
  }
  return EFI_SUCCESS;
}