Skip to content

optimize gamma setting #1174

springmeyer opened this Issue Apr 12, 2012 · 3 comments

2 participants

Mapnik member

To allow fine control over antialiasing level we allow users to set gamma and gamma-method properties on many symbolizers, like the polygon_symbolizer here

However, it appears the gamma setting is taking up a non-trivial amount of time:

The gamma array is not free, which is why AGG by default only calculates it once in the constructor:

Perhaps we could expose a public setter that can trigger returning to the default gamma without having to recalculate based on a function?

Mapnik member
artemp commented Mar 14, 2013

@springmeyer - why do we ---> gamma_method_(GAMMA_POWER) by default?

gamma_method_(GAMMA_NONE) -- is less expensive

Mapnik member

Gamma power came in from tomtom pull req. also a mailing list entry about it being slightly higher quality than linear.

Mapnik member

did some light perf testing against above changes: I rendered all of processed_p at z0. Rendering with a single <PolygonSymbolizer> took 4 seconds before this change and 3 after. Rendering with a single <LineSymbolizer> took 14 seconds before this change and 13 after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.