Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Michal Suchanek
On 16 February 2010 22:14, richardvo...@gmail.com wrote: > On Tue, Feb 16, 2010 at 3:05 PM, Michal Suchanek wrote: >> 2010/2/16 Vladimir 'φ-coder/phcoder' Serbinenko : >>> Michal Suchanek wrote: > With typeof macro this can be made type-neutral avoiding potential > mistakes. > +stati

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Michal Suchanek
On 16 February 2010 22:05, Michal Suchanek wrote: > 2010/2/16 Vladimir 'φ-coder/phcoder' Serbinenko : >> Michal Suchanek wrote: With typeof macro this can be made type-neutral avoiding potential mistakes. +static inline long +grub_min (long x, long y) +{ +  if (x > y

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread richardvo...@gmail.com
On Tue, Feb 16, 2010 at 3:05 PM, Michal Suchanek wrote: > 2010/2/16 Vladimir 'φ-coder/phcoder' Serbinenko : >> Michal Suchanek wrote: With typeof macro this can be made type-neutral avoiding potential mistakes. +static inline long +grub_min (long x, long y) +{ +  if

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Michal Suchanek
2010/2/16 Vladimir 'φ-coder/phcoder' Serbinenko : > Michal Suchanek wrote: >>> With typeof macro this can be made type-neutral avoiding potential mistakes. >>> +static inline long >>> +grub_min (long x, long y) >>> +{ >>> +  if (x > y) >>> +    return y; >>> +  else >>> +    return x; >>> +} >>> +

Re: [RFC] Framebuffer rotation patch, or why 'unsigned' fails us

2010-02-16 Thread Michal Suchanek
2010/2/16 Vladimir 'φ-coder/phcoder' Serbinenko : > Michal Suchanek wrote: >> This also enhances the video interface so that drawing at negative >> position is representable in the arguments. Iit is then possible to >> blit a bitmap without first clipping the topleft part by just blitting >> at neg

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread richardvo...@gmail.com
On Tue, Feb 16, 2010 at 12:03 PM, Isaac Dupree wrote: > On 02/16/10 10:52, Michal Suchanek wrote: >>> >>> enum allows it just fine >> >> Not here: >> >> typedef enum t1 { BTI1 = 1, > > typo, should be "BIT1". then it works. (In C.  Also remember not to get > confused by the fact that it doesn't wo

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Isaac Dupree
On 02/16/10 10:52, Michal Suchanek wrote: enum allows it just fine Not here: typedef enum t1 { BTI1 = 1, typo, should be "BIT1". then it works. (In C. Also remember not to get confused by the fact that it doesn't work in C++, for type-related reasons that we don't need to get into here be

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Michal Suchanek wrote: >> With typeof macro this can be made type-neutral avoiding potential mistakes. >> +static inline long >> +grub_min (long x, long y) >> +{ >> + if (x > y) >> +return y; >> + else >> +return x; >> +} >> + >> > > I don't see how typeof would be used. As I underst

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Michal Suchanek
2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : > Michal Suchanek wrote: >> Hello >> >> Sending a preliminary framebuffer rotation patch. >> >> You can use videotest to see 4 tiles rotated from the same bitmap data. >> >> > +char leaf_data[] = { 0x00, 0x0f, 0xe0, 0x00, > +                     0x0

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Michal Suchanek
2010/2/16 Vladimir 'φ-coder/phcoder' Serbinenko : > Michal Suchanek wrote: >> 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : >> >>> Michal Suchanek wrote: >> This requires that both u and w be in the chosen set of generators >> because otherwise use of v or s twice is required to get one from t

Re: [RFC] Framebuffer rotation patch, or why 'unsigned' fails us

2010-02-16 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Michal Suchanek wrote: > This also enhances the video interface so that drawing at negative > position is representable in the arguments. Iit is then possible to > blit a bitmap without first clipping the topleft part by just blitting > at negative position which should make some operations easier

Re: [RFC] Framebuffer rotation patch

2010-02-16 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Michal Suchanek wrote: > 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : > >> Michal Suchanek wrote: >> >>> 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : >>> >>> Michal Suchanek wrote: > Hello > > Sending a preliminary framebuffer rotation pa

Re: [RFC] Framebuffer rotation patch, or why 'unsigned' fails us

2010-02-15 Thread Colin D Bennett
On Mon, 15 Feb 2010 19:14:57 +0100 Michal Suchanek wrote: > What is left unsigned is the framebuffer size in mode info and it > indeed requires some casts and causes trouble. It made me change one > of the transform routines to asymmetric types because it is used > (almost) exclusively on the mod

Re: [RFC] Framebuffer rotation patch, or why 'unsigned' fails us

2010-02-15 Thread Michal Suchanek
On 15 February 2010 18:05, Colin D Bennett wrote: > On Sat, 13 Feb 2010 18:29:41 +0100 > Michal Suchanek wrote: > >> 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : >> > Michal Suchanek wrote: >> >> 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko >> >> : >> >> >> >>> Michal Suchanek wrote: >> >

Re: [RFC] Framebuffer rotation patch, or why 'unsigned' fails us

2010-02-15 Thread Colin D Bennett
On Sat, 13 Feb 2010 18:29:41 +0100 Michal Suchanek wrote: > 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : > > Michal Suchanek wrote: > >> 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko > >> : > >> > >>> Michal Suchanek wrote: > >>> -    unsigned int x; > >>> -    unsigned int y; > >>> -    u

Re: [RFC] Framebuffer rotation patch

2010-02-13 Thread Michal Suchanek
2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : > Michal Suchanek wrote: >> 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : >> >>> Michal Suchanek wrote: >>> Hello Sending a preliminary framebuffer rotation patch. You can use videotest to see 4 tiles rotated from the sa

Re: [RFC] Framebuffer rotation patch

2010-02-11 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Michal Suchanek wrote: > On 11 February 2010 11:19, Michal Suchanek wrote: > >> 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : >> >>> Michal Suchanek wrote: >>> Hello Sending a preliminary framebuffer rotation patch. You can use videotest to see 4 tiles r

Re: [RFC] Framebuffer rotation patch

2010-02-11 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Michal Suchanek wrote: > 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : > >> Michal Suchanek wrote: >> >>> Hello >>> >>> Sending a preliminary framebuffer rotation patch. >>> >>> You can use videotest to see 4 tiles rotated from the same bitmap data. >>> >>> >>> >> +char leaf_data

Re: [RFC] Framebuffer rotation patch

2010-02-11 Thread Michal Suchanek
On 11 February 2010 11:19, Michal Suchanek wrote: > 2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : >> Michal Suchanek wrote: >>> Hello >>> >>> Sending a preliminary framebuffer rotation patch. >>> >>> You can use videotest to see 4 tiles rotated from the same bitmap data. >>> >>> >> +char leaf_

Re: [RFC] Framebuffer rotation patch

2010-02-11 Thread Michal Suchanek
2010/2/11 Vladimir 'φ-coder/phcoder' Serbinenko : > Michal Suchanek wrote: >> Hello >> >> Sending a preliminary framebuffer rotation patch. >> >> You can use videotest to see 4 tiles rotated from the same bitmap data. >> >> > +char leaf_data[] = { 0x00, 0x0f, 0xe0, 0x00, > +                     0x0

Re: [RFC] Framebuffer rotation patch

2010-02-10 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Michal Suchanek wrote: > Hello > > Sending a preliminary framebuffer rotation patch. > > You can use videotest to see 4 tiles rotated from the same bitmap data. > > +char leaf_data[] = { 0x00, 0x0f, 0xe0, 0x00, + 0x00, 0x7f, 0xfc, 0x00, + 0x01, 0xff, 0xff,