running gnome and apps on Xvnc at 16 bpp

Vlad Harchev hvv "at" hippo.ru
Sat, 04 Nov 2000 07:20:33 +0000


On 4 Nov 2000, Const Kaplinsky wrote:

> >>>>> "VH" == Vlad Harchev <hvv "at" hippo.ru> writes:
> 
>     >> === cut ===
>     >> # This speeds up rendering considerably, but may not work on
>     >> # your hardware due to it bypassing a few layers and
>     >> # byte-twiddling the rendered image data manually, and due to
>     >> # endianess, bit-ordering or RGB ordering it may screw up and
>     >> # not work, so try it.. if things work great!, if not, wait
>     >> # until a renderer for your situation is written, or write one
>     >> # yourself and donate it. It's easy to do, just look at rend.c
>     >> FastRender off
>     >> === cut ===
>     >>
>     >> I think it's very likely that this setting is the actual reason
>     >> for Gnome problems you have described. Could you please check
>     >> it in your installation?
> 
>     VH> No, it doesn't matter. All component's widths and masks are
>     VH> hardcoded into Imlib's code and logic - see Imlib/rend.c For
>     VH> example, the piece of code:
> 
>     VH> void render_15_fast_dither(ImlibData * id, ImlibImage * im,
> 
> I see "fast" as a part of the function name. Does not it mean that
> it's called only when FastRender is on in the config file? Have you
> looked at your imlib config?

 It doesn't matter. Here is another piece:

void
render_15_dither(ImlibData * id, ImlibImage * im, int w, int h, XImage * xim,
                 XImage * sxim, int *er1, int *er2, int *xarray,
                 unsigned char **yarray)
{
  int                 x, y, val, r, g, b, *ter, ex, er, eg, eb;
  unsigned char      *ptr2;

  for (y = 0; y < h; y++)
    {
      ter = er1;
      er1 = er2;
      er2 = ter;
      for (ex = 0; ex < (w + 2) * 3; ex++)
        er2[ex] = 0;
      ex = 3;
      for (x = 0; x < w; x++)
        {
          ptr2 = yarray[y] + xarray[x];
          r = (int)*ptr2++;
          g = (int)*ptr2++;
          b = (int)*ptr2;
          er = r + er1[ex++];
          eg = g + er1[ex++];
          eb = b + er1[ex++];
          if (er > 255)
            er = 255;
          if (eg > 255)
            eg = 255;
          if (eb > 255)
            eb = 255;
          val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3);
          er = er & 0x07;
          eg = eg & 0x07;
          eb = eb & 0x07;
          DITHER_ERROR(er1, er2, ex, er, eg, eb);
          XPutPixel(xim, x, y, val);
        }
    }
}

 There is no 'fast' in the name, but everything is again hardcoded. In fact,
Imlib even doesn't use information on the masks and shifts in rend.c at all.
 It's Imlib that broken.

 
>     >> * gv, kghostview (GhostScript interpreter fails to render
>     >>   documents);
> 
>     VH>  Hmm, I didn't expect this from gv.
> 
> Probably it's not gv problem, it's ghostscript issue.
 
 Sure, its X11 output driver is guilty.

> -- 
> With Best Wishes,
> Constantin
> 

 Best regards,
  -Vlad
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------