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

improve inference and caching of draw_mesh #1723

Merged
merged 23 commits into from
Mar 14, 2022
Merged

Conversation

SimonDanisch
Copy link
Member

@SimonDanisch SimonDanisch commented Mar 3, 2022

  • Make draw_mesh more inferrable and specialize less to crazy mesh type.
  • also add some direct calls for drawing the mesh that's not cached because of inference failures.
    Merged refactor and improve conversions #1743 into this PR, since it was improving similar areas and needed the same fixes.
    This includes a few breaking changes:
  • breaking to_colormap(...) always returns Vector{RGBAf} now... Still need to contemplate, if that's a good change, since colormaps should almost never contain alpha - but it spilled over from to_color which often contains the alpha so i made sure that to_color always returns Union{RGBAf, Vector{RGBAf}}
  • breaking removed conversion for tuples of colors for colormap (so colormap = (colors...,) isn't accepted anymore)
  • breaking removed to_colormap(gradient, n), since it was very inconsistent and impossible to actually implement. One should use Makie.categorical_colors(gradient, n) for this.
  • removed fallback to_xxxx(value) = value for to_colormap/to_color/etc
  • one now overloads to_xxx instead of convert_attribute(value, key"xxx")

@MakieBot
Copy link
Collaborator

MakieBot commented Mar 3, 2022

Compile Times benchmark

@SimonDanisch SimonDanisch merged commit 406978c into master Mar 14, 2022
@SimonDanisch SimonDanisch deleted the sd/better-mesh-draw branch March 14, 2022 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants