Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Cargo.lock

dist/

maplibre-gl-js/

# Cache by reqwest-middleware-cache
*reqwest*cache*
*maplibre*cache*
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"apple",
"web",
"benchmarks",
"render-tests",
]

[workspace.package]
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benches/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use maplibre::{
fn headless_render(c: &mut Criterion) {
c.bench_function("headless_render", |b| {
let (mut map, layer) = run_multithreaded(async {
let (kernel, renderer) = create_headless_renderer(1000, None).await;
let (kernel, renderer) = create_headless_renderer(1000, 1000, None).await;
let style = Style::default();

let plugins: Vec<Box<dyn Plugin<_>>> = vec![
Expand Down
15 changes: 15 additions & 0 deletions inspect.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use image::GenericImageView;
fn main() {
let img = image::open("render-tests/src/tests/fill-color/default/expected.png").unwrap();
println!("Dimensions: {:?}", img.dimensions());
let mut black = 0;
let mut white = 0;
let mut other = 0;
for pixel in img.pixels() {
let p = pixel.2;
if p[0] == 0 && p[1] == 0 && p[2] == 0 { black += 1; }
else if p[0] == 255 && p[1] == 255 && p[2] == 255 { white += 1; }
else { other += 1; }
}
println!("Black: {}, White: {}, Other: {}", black, white, other);
}
2 changes: 2 additions & 0 deletions maplibre-winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ cgmath.workspace = true
instant.workspace = true
log.workspace = true
thiserror.workspace = true
reqwest = { workspace = true, features = ["json"] }
serde_json.workspace = true
1 change: 1 addition & 0 deletions maplibre-winit/src/noweb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ pub fn run_headed_map<P>(
renderer_builder,
vec![
Box::new(RenderPlugin::default()),
Box::new(maplibre::background::BackgroundPlugin::default()),
Box::new(maplibre::vector::VectorPlugin::<
maplibre::vector::DefaultVectorTransferables,
>::default()),
Expand Down
3 changes: 2 additions & 1 deletion maplibre/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ thread-safe-futures = []
embed-static-tiles = ["maplibre-build-tools/sqlite"]
headless = ["png"]
raster = ["image"]
geojson = []


[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies]
Expand Down Expand Up @@ -51,7 +52,7 @@ cgmath.workspace = true
geo.workspace = true
geo-types.workspace = true
rstar.workspace = true
geozero.workspace = true
geozero = { workspace = true, features = ["with-geojson"] }
tile-grid.workspace = true

# Rendering
Expand Down
Loading
Loading