Refactor cairo markers dispatchers to inherit from base classes.