Ticket #2768 (closed feature: fixed)

Opened 3 years ago

Last modified 3 years ago

Only call dashStyle when strokeDashstyle is set

Reported by: ahocevar Owned by:
Priority: minor Milestone: 2.10 Release
Component: Renderer Version: 2.9
Keywords: Cc:
State: Complete

Description

Currently, with every feature that has a stroke symbolizer set, the dashStyle method will be called to determine the dash style. This is not only relatively expensive, it also requires the strokeDashstyle to have a non-null default in the new Symbolizer classes.

The attached patch removes strokeDasharray from the renderer's defaultSymbolizer, adds an additional check in the renderers to only call dashStyle when the strokeDashstyle symbolizer property is set, and sets the strokeDashstyle default to null in the new Symbolizer classes.

Tests still pass, thanks for any review.

Attachments

openlayers-2768.patch Download (3.4 KB) - added by ahocevar 3 years ago.

Change History

Changed 3 years ago by ahocevar

Changed 3 years ago by tschaub

  • state changed from Review to Commit

Nice! Thanks for fixing this up.

Changed 3 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [10621]) Only call dashStyle when strokeDashstyle is set. r=tschaub (closes #2768)

Note: See TracTickets for help on using tickets.