-
-
Notifications
You must be signed in to change notification settings - Fork 290
/
precompiles.jl
54 lines (49 loc) · 2.03 KB
/
precompiles.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using PrecompileTools
macro compile(block)
return quote
let
$(esc(block))
return nothing
end
end
end
precompile(Makie.initialize_block!, (Axis,))
precompile(_get_glyphcollection_and_linesegments,
(LaTeXStrings.LaTeXString, Int64, Float32,
FreeTypeAbstraction.FTFont, Attributes,
Tuple{Symbol,Symbol}, Quaternion{Float64},
MakieCore.Automatic, Float64,
ColorTypes.RGBA{Float32}, ColorTypes.RGBA{Float32},
Int64, Int64, Vec{2,Float32}))
precompile(Makie.apply_alignment_and_justification!, (Vector{Vector{Makie.GlyphInfo}}, MakieCore.Automatic,
Tuple{Symbol,Symbol}))
precompile(MakieCore.convert_arguments, (Type{Scatter}, UnitRange{Int64}))
precompile(Makie.assemble_colors, (UnitRange{Int64}, Any, Any))
let
@compile_workload begin
f = Figure()
ax = Axis(f[1, 1])
Makie.initialize_block!(ax)
base_path = normpath(joinpath(dirname(pathof(Makie)), "..", "precompile"))
shared_precompile = joinpath(base_path, "shared-precompile.jl")
include(shared_precompile)
empty!(FONT_CACHE)
empty!(DEFAULT_FONT)
empty!(ALTERNATIVE_FONTS)
Makie.CURRENT_FIGURE[] = nothing
end
nothing
end
for T in (DragPan, RectangleZoom, LimitReset)
precompile(process_interaction, (T, MouseEvent, Axis))
end
precompile(process_axis_event, (Axis, MouseEvent))
precompile(process_interaction, (ScrollZoom, ScrollEvent, Axis))
precompile(el32convert, (Vector{Int64},))
precompile(translate, (MoveTo, Vec2{Float64}))
precompile(scale, (MoveTo, Vec{2,Float32}))
precompile(append!, (Vector{FreeType.FT_Vector_}, Vector{FreeType.FT_Vector_}))
precompile(convert_command, (MoveTo,))
precompile(plot!, (MakieCore.Text{Tuple{Vector{Point{2, Float32}}}},))
precompile(Vec2{Float64}, (Tuple{Int64,Int64},))
precompile(MakieCore._create_plot, (typeof(scatter), Dict{Symbol,Any}, UnitRange{Int64}))