nanogui@linuxhacker.org

nanogui@linuxhacker.org


Subject: Re: attaching to the engine layer
From: Greg Haerr
Date: Wed, 30 Aug 2000 10:18:17 -0600

: I'm trying to figure out how to use MW's engine layer as a
: colordepth-converting framebuffer device.  Specifically, how to
: send it a rectangular 32-bit (or 24-bit) image to draw.

The fast way to do this is using GdBlit(), which requires
two PSDs.  This means that you dummy up a fake psd 
prior to calling GdBlit, and dummy up the fake psd to use
your memory area as the "memory device" contents.  This
means you also should set the PSF_MEMORY flag.

I've been meaning for quite some time to dummy up
GdArea() to do exactly this, but haven't had time yet.


: 
: So far, I've been using GdDrawImage().  It works but it is
: incredibly slow.  It seems to be performing clipping and
: colordepth conversion on each pixel, even though the image I send
: it is entirely visible and the bitdepth of display is the same as
: the image data.

Yes, image drawing currently doesn't use blitting, since
the internal image format isn't quite a psd.  I've recently
made some enhancements in this area, but it's not done yet.



: 
: The speed seems to depend mostly on the image contents -- images
: with many colors are the slowest, while a flat grey is almost
: speedy.  Is MW doing something odd with palettes or color
: conversion caching?  

All images passed thru GdDrawImage go through a special
palette conversion and get their palette re-made according
to the current system palette and the allowed free entries
remaining.  A future mod will also include attaching ID's to
image data in the server so that image processing for the
browser is faster.  This will also have to comply
with a settable max memory useage.



How can I make this faster? 

For now, use a dummy psd and call GdBlit(), it will be
extremely fast.


 Is there any
: way I can turn off clipping?  (and maybe a way to speed up or
: optionally disable color conversion?)

I don't think clipping is the problem here.  There's no easy
way to turn off clipping.  I'll look into having a flag with the image
structure that turns off color conversion...

Regards,

Greg





: 
: 
: --
: Terra Soft Solutions, Inc.
:  http://www.terrasoftsolutions.com/
: 
:  Yellow Dog Linux
:  "The Ultimate Companion for a Dedicated Server"
:  http://www.yellowdoglinux.com/
: 
:  Black Lab Linux
:  Advanced Workstations, Parallel, and Embedded Solutions
:  http://www.blacklablinux.com/ 
: 
: 
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: nanogui-unsubscribe@linuxhacker.org
: For additional commands, e-mail: nanogui-help@linuxhacker.org
: 
: 


nanogui@linuxhacker.org