Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster line rendering #873

Closed
artemp opened this issue Oct 11, 2011 · 5 comments
Closed

faster line rendering #873

artemp opened this issue Oct 11, 2011 · 5 comments

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

needs testing but possibility we should be using u8 for thin lines:

"You might be able to speed the
rendering up a little if you use the scanline_p8 type (the packed version)
for thicker strokes and the unpacked version (scanline_u8) for thin strokes"

http://comments.gmane.org/gmane.comp.graphics.agg/3610

{{{

!diff

Index: src/agg/process_line_symbolizer.cpp

--- src/agg/process_line_symbolizer.cpp (revision 3296)
+++ src/agg/process_line_symbolizer.cpp (working copy)
@@ -69,7 +69,7 @@
ras_ptr->reset();
ras_ptr->gamma(agg::gamma_linear(0.0, stroke_.get_gamma()));

  • agg::scanline_p8 sl;
  • agg::scanline_u8 sl;
    metawriter_with_properties writer = sym.get_metawriter();
    for (unsigned i=0;i<feature.num_geometries();++i)
    {
    }}}
@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] generally we have to find a way to draw lines faster. we should review clipping and consider testing rasterizer_outline_aa as per: http://old.nabble.com/-AGG--Newbie-question%3A-How-to-learn--tt404602.html#a459319

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] also, initializing agg::scaline_u8 outside of function call: http://permalink.gmane.org/gmane.comp.graphics.agg/2859

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] Closting - great boost by exposing faster "outline_aa" method of rendering lines in r3298 as a text_symbolizer property that can be enabled with rasterizer=fast.

Also, u8 does not appear any faster than p8 for thin lines and world borders, and I also could not detect benefit of single creation of u8 class as member of renderer.

@artemp artemp closed this as completed Oct 11, 2011
artemp pushed a commit that referenced this issue Oct 11, 2011
…nes at the expense of dropping short geometries - for thin lines has nicer look but should not be used with think lines - refs #873
springmeyer pushed a commit that referenced this issue May 14, 2012
…its rendering quality and consistency with standard method - refs #873
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant