qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] cursor: add cursor functions.


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 1/3] cursor: add cursor functions.
Date: Thu, 6 May 2010 22:42:14 +0300

On 5/6/10, Gerd Hoffmann <address@hidden> wrote:
> >
> > >  +static const char cursor_left_ptr_32[32*32] = {
> > >  +    "                                "
> > >  +    " X                              "
> > >  +    " XX                             "
> > >  +    " X.X                            "
> > >  +    " X..X                           "
> > >  +    " X...X                          "
> > >  +    " X....X                         "
> > >  +    " X.....X                        "
> > >  +    " X......X                       "
> > >  +    " X.......X                      "
> > >  +    " X........X                     "
> > >  +    " X.....XXXXX                    "
> > >  +    " X..X..X                        "
> > >  +    " X.X X..X                       "
> > >  +    " XX  X..X                       "
> > >  +    " X    X..X                      "
> > >  +    "      X..X                      "
> > >  +    "       X..X                     "
> > >  +    "       X..X                     "
> > >  +    "        XX                      "
> > >  +    "                                "
> > >  +};
> > >
> >
> > Is this format standard?
> >
>
>  Inspiried by xpm but simplified a bit as full xpm support just for a
> built-in fallback cursor would have been overkill.  The nice thing about xpm
> is that you can use any text editor for editing icons.

But for X bitmaps, you can use any real drawing program. The same
would also apply to full xpm. But read on.

> > How about using X bitmap format instead:
> > $ cat /usr/include/X11/bitmaps/left_ptr
> >
>
>
> > Then there would be no need of parsing.
> >
>
>  Well.  You still would have to convert it as qemu internal cursor format is
> defined as 32bit depth, rgb with alpha channel.  So it doesn't buy you that
> much.

There's still more wasted memory compared to binary format.

I think the best would be to store only the 32 bit image and perform
any conversions offline. This was the approach with for example
keyboard tables, we don't convert them at startup but the original
tables are retained as comments.




reply via email to

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