Hello Erik,
Furthermore, from a code perspective I also struggle keeping the XOR drawing in place. I am now thinking indeed of using a pixmap for the 'fixed' elements and overdraw it with the edited elements. A quick test on my machine showed that this can be done in roughly 3 ms, for both X-primitives and cairo. So I am now trying this way. If I succeed this would mean that double buffering is obligatory and all XOR drawing stuff is removed.
Yeah, don't bother to keep the XOR method. It's clever but unnecessary, and doesn't really work right with antialiasing anyway
I also played around a little with buffering everything fixed and drawing the editing on top. With this I got around 2.5 ms redrawing time (eq. to 400 fps) when editing, regardless of the complexity underneath.
That sounds very much like what I did with the graphics in Magic when I implemented the OpenGL graphics interface and the 24-bit graphics and no longer was able to use bit planes to draw and erase elements on top. Buffering helped with almost everything except zooming and panning, and panning I made faster by copying part of the buffer and redrawing only the part that appeared on screen due to the pan. > On my 4 year old laptop 2.3 GHz i3 with just the onboard intel hd 3000 > graphics card I get around 60 ms redrawing time (eq. to 17 fps) when I > open examples/diffamp_test3.ps, page 2. Diffamp_test3.ps is not a particularly aggressive example. I have some text-heavy documents in xcircuit with refresh rates < 1fps. However, I found, oddly, that diffamp_test3.ps would, if I zoomed in about 3 or 4 times, suddenly take about 2 seconds to redraw the screen. I can see it redraw from top to bottom. It's not in the drawwindow routine at all. However, that might not be a good measure because anything passed to the X11 server can be handled long after drawwindow() has returned. But I still don't get what was so slow there, and why it happens at one particular zoom level. Not counting that one weird slow refresh, I get around 10 fps on average. ---Tim +--------------------------------+-------------------------------------+ | R. Timothy Edwards (Tim) | email: t...@opencircuitdesign.com | | Open Circuit Design | web: http://opencircuitdesign.com | | 22815 Timber Creek Lane | phone: (301) 528-5030 | | Clarksburg, MD 20871-4001 | cell: (240) 401-0616 | +--------------------------------+-------------------------------------+ _______________________________________________ Xcircuit-dev mailing list Xcircuit-dev@opencircuitdesign.com http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev