Re: Overlay
Thank you for your help. Derek Lukasik wrote: 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? Does anyone have some more apps that experiment with colormaps and overlays? L
RE: Overlay
> 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