Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Fast XOR Painting under Aero

Back to Forum: Tech Off
  • User profile image
    W3bbo

    Apparently XOR painting is slow under DWM because it requires reading from the framebuffer (which is really slow now, apparently) and then writing it back again.

    This can be seen in VS2008 on Windows 7, resizing a frame (such as having two tabbed documents opened side-by-side and moving the divider) is slow: going at what feels like 20fps or so, but disable Aero and it goes at a smooth 60fps.

    So question: if you enable Aero Glass, but then disable "Show window contents while dragging" on System Properties, how come the system can do XOR painting really fast... but only for window frames? Does the window manager have access to something GDI doesn't?

  • User profile image
    Dexter

    how come the system can do XOR painting

    How do you know it's doing a XOR? It could also be (r,g,b) = (1,1,1) - (r,g,b) and that's something GPUs are good at.

    Does the window manager have access to something GDI doesn't?

    Well, of course, the window manager is a Direct3D app, not a GDI app.

  • User profile image
    AndyC

    , W3bbo wrote

    Apparently XOR painting is slow under DWM because it requires reading from the framebuffer (which is really slow now, apparently) and then writing it back again.

    It's not that reading is slow, it's that you actually have to composite everything so that there is actually a framebuffer to read from. Under the DWM all you have is a bunch of textured polygons.

    That being the case, I suspect the window manager is cheating and using a different technique, such as the one Dexter suggests, for drawing window outlines rather than an old-school XOR rectangle.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.