Improve performance of border drawing by minimizing calls to...
Improve performance of border drawing by minimizing calls to Surface::getTopologyHelper(). When drawing borders, the border point coordinates are converted from barycentric to cartesian coordinates and Surface::getTopologyHelper() was called for each point in the border. This has been changed so that Surface::getTopologyHelper() is called once for each border and the topology helper is then passed as a parameter to the conversion process for each point. On my Mac, this resulted in about a 20% reduction in time required to draw a large number of surfaces with many borders. Apple's Instruments Tool had indicated that significant time was spent in locking and unlocking of the mutex in Surface::getTopologyHelper. Also, fixed drawing of 'Lines' border drawing so that it uses OpenGL line segments so that when 'unstretched lines' is enabled, segments can be skipped.
parent
d98d9b10
Please register or sign in to comment