kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22309
OS X drawing performance improvements
Hi,
I got some promising feedback to my previous experimentals (thanks to Chris, Adam, and all others who tested behind the scenes!).
So here it goes, attached the patch.
OS X: Optimize drawing of grid, polygons, and line arrays in the legacy canvases using wxGraphicsContext.
Note 1:
The patch enables USE_WX_GRAPHICS_CONTEXT for OS X per default - this shouldn’t be a major change because it seems to get used on OS X behind the scenes anyway.
As a side-effect, this might improve behavior with anti-aliasing because then KiCad per default shifts drawing by (0.5, 0.5) into the middle of the virtual pixels, so things maybe will be less blurry.
It will still build without using USE_WX_GRAPHICS_CONTEXT, but then the optimizations obviously won’t be used.
Note 2:
The optimizations currently only are effective for USE_WX_GRAPHICS_CONTEXT *and* OS X.
They might be also good for other platforms using USE_WX_GRAPHICS_CONTEXT because it aggregates some drawing primitives using paths wxGraphicsContext provides.
Since I don’t know where else USE_WX_GRAPHICS_CONTEXT is used, I did not enable it in general.
Note 3:
It adds some #ifdefs for not compiling the wxGraphicsContext stuff at all when USE_WX_GRAPHICS_CONTEXT isn’t in use.
If you hate #ifdefs, this also could be dropped but then it will always check if wxGraphicsContext can be applied...
Regards,
Bernhard
Attachment:
osx-draw-opt.patch
Description: Binary data
Follow ups