[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: [PATCH 1/2] Framebuffer split

From: Michal Suchanek
Subject: Re: Fwd: [PATCH 1/2] Framebuffer split
Date: Sat, 8 Aug 2009 21:06:07 +0200


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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]