RE: mioverlay

2003-02-21 Thread Derek Lukasik
 ok... So There's no implementation of overlay using an independent surface on any 
 driver?

Not any open-source driver...

 Also, what is the xf8_32wid? I see that's it's an implementation of the xf8_16bpp 
 but for an 8 over 32  surface. But what does
the wid stand for?

Someone may know better than me, but when I see WID I think of Window ID
planes or attribute planes.  I don't know that that's what WID stands for
in this case.  I'm not really familiar with the xf8_32wid module.

Some devices have a surface that controls, among other things,
which surface is selected, per pixel.  These can be really useful for fast
double buffer swapping (a register write -vs- a CopySwap or a full WID plane
paint).  They can also control gamma correction and pixel formatting.  WID
planes seem to be quickly fading into extinction with modern graphics devices...

Derek

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


RE: Overlay

2003-02-20 Thread Derek Lukasik
 Hello,
 
 I've been going through how Xserver implements Overlay. I still find 
 information on this very limited. So I'm hoping that this thread will 
 enlighten me more about this.
 
 First of all the Chips and Technologies driver implements 
 overlay using 2 different framebuffers. Unfortunatly I can't get my hands on one to 
 see how it works. But here's my questions:
 
 Let's say you have 2 different visuals. One PseudoColor and one 
 TrueColor. You have an application that runs only in 
 PseudoColor.  As I understand the 8 bit app will be drawn on the overlay 
 surface. I need to confirm on how does it know where to draw itself. For example, 
when I 
 move the window with a border that is TrueColor. How does it get 
 updated? How does it know where to display the overlay surface?
 

The app doesn't know anything about how to draw itself.  All the
work happens in the driver.  All the app has to know is that it is
rendering to a depth 8 PseudoColor surface.  The driver must look at
requests coming from clients, note that they're targeted at the
overlay surface, and fulfill the request appropriately.

When you mention moving a window with a TrueColor border, I assume you're
referring to the window manager decorations as the border.  A single
window in X cannot have a border with a different depth.  A parent window
can have children with different depths, however.  That is usually the
situation with a window manager.  When you move the parent window, its
children (in whatever layer) move as well.

 The color key concept is confusing for me. For example: the 
 driver has  index 255 to be the color key. What does that mean for an 8 bit app? 
 Anything with color index 255 will be transparent? Or does that mean 
 that anything with that color index will be visible?
 

Overlay is typically implemented by reserving one index in the PseudoColor
palette for transparency.  This allows clients to render transparency
if they wish.  That index is usually 255.  It is indicated by the
SERVER_OVERLAY_VISUALS property.  Clients should decode that property to
determine that transparent index value.  The property tells you which visuals
are overlay visuals and for each, what type of transparency they implement
(as well as the transparent index).

The X server may present multiple overlay visuals.  One visual may implement
transparency whereas another may not (again look at the SERVER_OVERLAY_VISUALS
property).  The point here is that within the same class of visual, you
may encounter both overlay opaque (no transparency) and overlay transparent
visuals.  A client should choose the appropriate visual dependent upon their
needs (i.e. if they don't want transparency, don't select a visual with transparency
enabled).  Not all drivers implement this functionality.  Most implement only
transparent visuals.  So, when you get to that last entry (usually 255), you
start seeing through to the image planes.

 There's overlay for diplaying an 8 bit app on a 24 bit surface. But 
 there's also overlay when you want draw something over something you 
 don't want to destroy. By reserving color cells for 
 overlay.  It doesn't seem the same kind of overlay.

Not sure what you're asking here.  Are you referring to the different types
of overlay implementation?  Where some drivers implement overlay within the
alpha channel of the image planes verses those that use an entirely independent
surface?

Derek

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel



RE: [Xpert]memory leak

2002-10-09 Thread Derek Lukasik

 Hi experts,
 Do you mind telling me your methods to detect memory leaks in X ?
 I wonder why X is eating more and more RAM, every week I need 
 to restart 
 X, otherwise, it's taking more than 64Mb.
 Regards,
 Frederic Heem
 

In the past, I've added simple memory checking code to the X
server's internal memory management routines.  These can be
found in os/utils.c.  On linux, you can use the
backtrace/backtrace_symbols routines to track where allocations
occurred.

Another alternative is the dmalloc library (www.dmalloc.com).

Derek

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert