Hello

I cannot get any sense of these patches "with moving code around
omitted" so I tried the git repository in Vladimir's signature.

Maybe I am missing something but the function of this code escapes me:

static grub_err_t
grub_video_vbe_set_viewport (unsigned int x, unsigned int y,
                            unsigned int width, unsigned int height)
{
  /* Make sure viewport is withing screen dimensions.  If viewport was set
     to be out of the region, mark its size as zero.  */
  if (x > active_mode_info.x_resolution)
    {
      x = 0;
      width = 0;
    }

  if (y > active_mode_info.y_resolution)
    {
      y = 0;
      height = 0;
    }

  if (x + width > active_mode_info.x_resolution)
    width = active_mode_info.x_resolution - x;

  if (y + height > active_mode_info.y_resolution)
    height = active_mode_info.y_resolution - y;
  return grub_video_fb_set_viewport (x, y, width, height);
}

As I understand it the code checks the bounds against the active
videomode and then sets the viewport on the active render target.
Since the active render target can be arbitrarily set by the user (to,
say an offscreen bitmap for rendering the terminal text) I do not see
how these two parts match.

Thanks

Michal


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to