Page MenuHomePhabricator

PlanarFigureMapper draws control points with opacity == 0
Closed, ResolvedPublic

Description

The PlanarFigureMapper draws the control points in method ::DrawMarker(...) even if the given opacity is 0.

This is totally unnecesary as nothing is visible anyway. It would be faster to just return at the beginning of the method if teh two given opacities (one for the outline, one for the filling) are both 0.

Most likely this will not be noticably at all. However, as our rendering is sometimes a bit slow, every tweak is welcome.

Event Timeline

[92f7c8]: Merge branch 'bug-12153-planarfiguremapper-controlpoint-rendering'

Merged commits:

2012-06-08 15:36:30 Markus Engel [2fae70]
not rendering anything if both opacities are 0

I changed the PlanarFigureMapper2D to return early from the DrawMarker() Method if both the marker- and the line-opacity are 0.

In this case, nothing would be visible anyway, so why bother to render in the first place?

As I said before, this tweak will most likely not be noticably at all. However, unnecessary actions should be avoided.