mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Run formatter
This commit is contained in:
parent
3f1e165cda
commit
76bf7a6ecf
@ -1,7 +1,6 @@
|
|||||||
use maplibre::environment::DefaultTransferables;
|
|
||||||
|
|
||||||
use maplibre::io::apc::SchedulerAsyncProcedureCall;
|
|
||||||
use maplibre::{
|
use maplibre::{
|
||||||
|
environment::DefaultTransferables,
|
||||||
|
io::apc::SchedulerAsyncProcedureCall,
|
||||||
platform::{http_client::ReqwestHttpClient, scheduler::TokioScheduler},
|
platform::{http_client::ReqwestHttpClient, scheduler::TokioScheduler},
|
||||||
MapBuilder,
|
MapBuilder,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
use maplibre::headless::HeadlessEnvironment;
|
|
||||||
use maplibre::io::apc::SchedulerAsyncProcedureCall;
|
|
||||||
use maplibre::{
|
use maplibre::{
|
||||||
coords::{LatLon, WorldTileCoords},
|
coords::{LatLon, WorldTileCoords},
|
||||||
error::Error,
|
error::Error,
|
||||||
headless::HeadlessMapWindowConfig,
|
headless::{HeadlessEnvironment, HeadlessMapWindowConfig},
|
||||||
|
io::apc::SchedulerAsyncProcedureCall,
|
||||||
platform::{http_client::ReqwestHttpClient, scheduler::TokioScheduler},
|
platform::{http_client::ReqwestHttpClient, scheduler::TokioScheduler},
|
||||||
render::settings::{RendererSettings, TextureFormat},
|
render::settings::{RendererSettings, TextureFormat},
|
||||||
util::grid::google_mercator,
|
util::grid::google_mercator,
|
||||||
|
|||||||
@ -1,18 +1,18 @@
|
|||||||
|
use std::{cell::RefCell, marker::PhantomData, ops::Deref, rc::Rc};
|
||||||
|
|
||||||
use instant::Instant;
|
use instant::Instant;
|
||||||
use maplibre::environment::{DefaultTransferables, Environment};
|
|
||||||
use maplibre::io::apc::{AsyncProcedureCall, Message};
|
|
||||||
use maplibre::io::scheduler::Scheduler;
|
|
||||||
use maplibre::io::transferables::Transferables;
|
|
||||||
use maplibre::{
|
use maplibre::{
|
||||||
|
environment::{DefaultTransferables, Environment},
|
||||||
error::Error,
|
error::Error,
|
||||||
io::source_client::HttpClient,
|
io::{
|
||||||
|
apc::{AsyncProcedureCall, Message},
|
||||||
|
scheduler::Scheduler,
|
||||||
|
source_client::HttpClient,
|
||||||
|
transferables::Transferables,
|
||||||
|
},
|
||||||
map_schedule::InteractiveMapSchedule,
|
map_schedule::InteractiveMapSchedule,
|
||||||
window::{EventLoop, HeadedMapWindow, MapWindowConfig},
|
window::{EventLoop, HeadedMapWindow, MapWindowConfig},
|
||||||
};
|
};
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::marker::PhantomData;
|
|
||||||
use std::ops::Deref;
|
|
||||||
use std::rc::Rc;
|
|
||||||
use winit::{
|
use winit::{
|
||||||
event::{ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent},
|
event::{ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent},
|
||||||
event_loop::ControlFlow,
|
event_loop::ControlFlow,
|
||||||
|
|||||||
@ -8,6 +8,7 @@ use std::{
|
|||||||
|
|
||||||
use bytemuck_derive::{Pod, Zeroable};
|
use bytemuck_derive::{Pod, Zeroable};
|
||||||
use cgmath::{num_traits::Pow, AbsDiffEq, Matrix4, Point3, Vector3};
|
use cgmath::{num_traits::Pow, AbsDiffEq, Matrix4, Point3, Vector3};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
style::source::TileAddressingScheme,
|
style::source::TileAddressingScheme,
|
||||||
@ -16,7 +17,6 @@ use crate::{
|
|||||||
SignificantlyDifferent,
|
SignificantlyDifferent,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
pub const EXTENT_UINT: u32 = 4096;
|
pub const EXTENT_UINT: u32 = 4096;
|
||||||
pub const EXTENT_SINT: i32 = EXTENT_UINT as i32;
|
pub const EXTENT_SINT: i32 = EXTENT_UINT as i32;
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
use crate::io::apc::AsyncProcedureCall;
|
use crate::{
|
||||||
use crate::io::transferables::Transferables;
|
io::{
|
||||||
use crate::io::transferables::{
|
apc::AsyncProcedureCall,
|
||||||
DefaultTessellatedLayer, DefaultTileTessellated, DefaultUnavailableLayer,
|
transferables::{
|
||||||
|
DefaultTessellatedLayer, DefaultTileTessellated, DefaultUnavailableLayer, Transferables,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
HttpClient, MapWindowConfig, Scheduler,
|
||||||
};
|
};
|
||||||
use crate::{HttpClient, MapWindowConfig, Scheduler};
|
|
||||||
|
|
||||||
pub trait Environment: 'static {
|
pub trait Environment: 'static {
|
||||||
type MapWindowConfig: MapWindowConfig;
|
type MapWindowConfig: MapWindowConfig;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
use std::marker::PhantomData;
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashSet,
|
collections::HashSet,
|
||||||
fs::File,
|
fs::File,
|
||||||
future::Future,
|
future::Future,
|
||||||
io::Write,
|
io::Write,
|
||||||
iter,
|
iter,
|
||||||
|
marker::PhantomData,
|
||||||
ops::{Deref, Range},
|
ops::{Deref, Range},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
@ -12,20 +12,19 @@ use std::{
|
|||||||
use tokio::{runtime::Handle, task};
|
use tokio::{runtime::Handle, task};
|
||||||
use wgpu::{BufferAsyncError, BufferSlice};
|
use wgpu::{BufferAsyncError, BufferSlice};
|
||||||
|
|
||||||
use crate::environment::DefaultTransferables;
|
|
||||||
use crate::io::apc::AsyncProcedureCall;
|
|
||||||
use crate::io::apc::SchedulerAsyncProcedureCall;
|
|
||||||
use crate::io::transferables::Transferables;
|
|
||||||
use crate::{
|
use crate::{
|
||||||
context::{MapContext, ViewState},
|
context::{MapContext, ViewState},
|
||||||
coords::{LatLon, ViewRegion, WorldCoords, WorldTileCoords, Zoom, TILE_SIZE},
|
coords::{LatLon, ViewRegion, WorldCoords, WorldTileCoords, Zoom, TILE_SIZE},
|
||||||
|
environment::DefaultTransferables,
|
||||||
error::Error,
|
error::Error,
|
||||||
headless::utils::HeadlessPipelineProcessor,
|
headless::utils::HeadlessPipelineProcessor,
|
||||||
io::{
|
io::{
|
||||||
|
apc::{AsyncProcedureCall, SchedulerAsyncProcedureCall},
|
||||||
pipeline::{PipelineContext, Processable},
|
pipeline::{PipelineContext, Processable},
|
||||||
source_client::HttpSourceClient,
|
source_client::HttpSourceClient,
|
||||||
tile_pipelines::build_vector_tile_pipeline,
|
tile_pipelines::build_vector_tile_pipeline,
|
||||||
tile_repository::{StoredLayer, TileRepository},
|
tile_repository::{StoredLayer, TileRepository},
|
||||||
|
transferables::Transferables,
|
||||||
TileRequest,
|
TileRequest,
|
||||||
},
|
},
|
||||||
render::{
|
render::{
|
||||||
|
|||||||
@ -1,16 +1,25 @@
|
|||||||
use crate::coords::WorldTileCoords;
|
use std::{
|
||||||
use crate::environment::DefaultTransferables;
|
collections::HashMap,
|
||||||
use crate::io::source_client::{HttpSourceClient, SourceClient};
|
future::Future,
|
||||||
use crate::io::transferables::Transferables;
|
pin::Pin,
|
||||||
use crate::io::TileRequest;
|
sync::{
|
||||||
use crate::Scheduler;
|
mpsc,
|
||||||
use crate::{Environment, HttpClient};
|
mpsc::{Receiver, Sender},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::future::Future;
|
use crate::{
|
||||||
use std::pin::Pin;
|
coords::WorldTileCoords,
|
||||||
use std::sync::mpsc;
|
environment::DefaultTransferables,
|
||||||
use std::sync::mpsc::{Receiver, Sender};
|
io::{
|
||||||
|
source_client::{HttpSourceClient, SourceClient},
|
||||||
|
transferables::Transferables,
|
||||||
|
TileRequest,
|
||||||
|
},
|
||||||
|
Environment, HttpClient, Scheduler,
|
||||||
|
};
|
||||||
|
|
||||||
/// The result of the tessellation of a tile.
|
/// The result of the tessellation of a tile.
|
||||||
/// `TessellatedLayer` contains the result of the tessellation for a specific layer, otherwise
|
/// `TessellatedLayer` contains the result of the tessellation for a specific layer, otherwise
|
||||||
|
|||||||
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
use std::{collections::HashSet, fmt};
|
use std::{collections::HashSet, fmt};
|
||||||
|
|
||||||
use crate::coords::WorldTileCoords;
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use crate::coords::WorldTileCoords;
|
||||||
|
|
||||||
pub mod apc;
|
pub mod apc;
|
||||||
pub mod geometry_index;
|
pub mod geometry_index;
|
||||||
pub mod pipeline;
|
pub mod pipeline;
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
use crate::coords::WorldTileCoords;
|
use geozero::mvt::{tile, tile::Layer};
|
||||||
use crate::io::tile_repository::StoredLayer;
|
|
||||||
use crate::render::ShaderVertex;
|
use crate::{
|
||||||
use crate::tessellation::{IndexDataType, OverAlignedVertexBuffer};
|
coords::WorldTileCoords,
|
||||||
use geozero::mvt::tile;
|
io::tile_repository::StoredLayer,
|
||||||
use geozero::mvt::tile::Layer;
|
render::ShaderVertex,
|
||||||
|
tessellation::{IndexDataType, OverAlignedVertexBuffer},
|
||||||
|
};
|
||||||
|
|
||||||
pub trait TileTessellated: Send {
|
pub trait TileTessellated: Send {
|
||||||
fn new(coords: WorldTileCoords) -> Self;
|
fn new(coords: WorldTileCoords) -> Self;
|
||||||
|
|||||||
@ -16,8 +16,14 @@
|
|||||||
//! maplibre = "0.0.2"
|
//! maplibre = "0.0.2"
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
use crate::environment::Environment;
|
use std::{
|
||||||
|
borrow::{Borrow, BorrowMut},
|
||||||
|
cell::RefCell,
|
||||||
|
rc::Rc,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
environment::Environment,
|
||||||
io::{scheduler::Scheduler, source_client::HttpClient},
|
io::{scheduler::Scheduler, source_client::HttpClient},
|
||||||
map_schedule::InteractiveMapSchedule,
|
map_schedule::InteractiveMapSchedule,
|
||||||
render::{
|
render::{
|
||||||
@ -27,9 +33,6 @@ use crate::{
|
|||||||
style::Style,
|
style::Style,
|
||||||
window::{EventLoop, HeadedMapWindow, MapWindow, MapWindowConfig, WindowSize},
|
window::{EventLoop, HeadedMapWindow, MapWindow, MapWindowConfig, WindowSize},
|
||||||
};
|
};
|
||||||
use std::borrow::{Borrow, BorrowMut};
|
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
pub mod context;
|
pub mod context;
|
||||||
pub mod coords;
|
pub mod coords;
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
use std::cell::RefCell;
|
use std::{cell::RefCell, marker::PhantomData, mem, rc::Rc};
|
||||||
use std::rc::Rc;
|
|
||||||
use std::{marker::PhantomData, mem};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
context::{MapContext, ViewState},
|
context::{MapContext, ViewState},
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
|
||||||
use crate::error::Error;
|
use crate::{error::Error, Scheduler};
|
||||||
use crate::Scheduler;
|
|
||||||
|
|
||||||
/// Multi-threading with Tokio.
|
/// Multi-threading with Tokio.
|
||||||
pub struct TokioScheduler;
|
pub struct TokioScheduler;
|
||||||
|
|||||||
@ -1,28 +1,29 @@
|
|||||||
//! [Stages](Stage) for requesting and preparing data
|
//! [Stages](Stage) for requesting and preparing data
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::{
|
||||||
use std::marker::PhantomData;
|
cell::RefCell,
|
||||||
use std::rc::Rc;
|
marker::PhantomData,
|
||||||
use std::sync::{mpsc, Arc, Mutex};
|
rc::Rc,
|
||||||
|
sync::{mpsc, Arc, Mutex},
|
||||||
|
};
|
||||||
|
|
||||||
use geozero::{mvt::tile, GeozeroDatasource};
|
use geozero::{mvt::tile, GeozeroDatasource};
|
||||||
use request_stage::RequestStage;
|
use request_stage::RequestStage;
|
||||||
|
|
||||||
use crate::environment::DefaultTransferables;
|
|
||||||
use crate::io::apc::{AsyncProcedureCall, Context, Message};
|
|
||||||
use crate::io::transferables::Transferables;
|
|
||||||
use crate::io::transferables::{
|
|
||||||
DefaultTessellatedLayer, DefaultTileTessellated, DefaultUnavailableLayer, TessellatedLayer,
|
|
||||||
TileTessellated, UnavailableLayer,
|
|
||||||
};
|
|
||||||
use crate::{
|
use crate::{
|
||||||
coords::{WorldCoords, WorldTileCoords, Zoom, ZoomLevel},
|
coords::{WorldCoords, WorldTileCoords, Zoom, ZoomLevel},
|
||||||
|
environment::DefaultTransferables,
|
||||||
error::Error,
|
error::Error,
|
||||||
io::{
|
io::{
|
||||||
|
apc::{AsyncProcedureCall, Context, Message},
|
||||||
geometry_index::{GeometryIndex, IndexedGeometry, TileIndex},
|
geometry_index::{GeometryIndex, IndexedGeometry, TileIndex},
|
||||||
pipeline::{PipelineContext, PipelineProcessor, Processable},
|
pipeline::{PipelineContext, PipelineProcessor, Processable},
|
||||||
source_client::HttpSourceClient,
|
source_client::HttpSourceClient,
|
||||||
tile_pipelines::build_vector_tile_pipeline,
|
tile_pipelines::build_vector_tile_pipeline,
|
||||||
|
transferables::{
|
||||||
|
DefaultTessellatedLayer, DefaultTileTessellated, DefaultUnavailableLayer,
|
||||||
|
TessellatedLayer, TileTessellated, Transferables, UnavailableLayer,
|
||||||
|
},
|
||||||
TileRequest,
|
TileRequest,
|
||||||
},
|
},
|
||||||
render::ShaderVertex,
|
render::ShaderVertex,
|
||||||
|
|||||||
@ -1,12 +1,17 @@
|
|||||||
//! Receives data from async threads and populates the [`crate::io::tile_repository::TileRepository`].
|
//! Receives data from async threads and populates the [`crate::io::tile_repository::TileRepository`].
|
||||||
|
|
||||||
use crate::io::apc::{AsyncProcedureCall, Message};
|
use std::{borrow::BorrowMut, cell::RefCell, ops::Deref, rc::Rc};
|
||||||
use crate::io::transferables::{TessellatedLayer, TileTessellated, UnavailableLayer};
|
|
||||||
use crate::{context::MapContext, io::tile_repository::StoredLayer, schedule::Stage, Environment};
|
use crate::{
|
||||||
use std::borrow::BorrowMut;
|
context::MapContext,
|
||||||
use std::cell::RefCell;
|
io::{
|
||||||
use std::ops::Deref;
|
apc::{AsyncProcedureCall, Message},
|
||||||
use std::rc::Rc;
|
tile_repository::StoredLayer,
|
||||||
|
transferables::{TessellatedLayer, TileTessellated, UnavailableLayer},
|
||||||
|
},
|
||||||
|
schedule::Stage,
|
||||||
|
Environment,
|
||||||
|
};
|
||||||
|
|
||||||
pub struct PopulateTileStore<E: Environment> {
|
pub struct PopulateTileStore<E: Environment> {
|
||||||
apc: Rc<RefCell<E::AsyncProcedureCall>>,
|
apc: Rc<RefCell<E::AsyncProcedureCall>>,
|
||||||
|
|||||||
@ -1,32 +1,33 @@
|
|||||||
//! Requests tiles which are currently in view
|
//! Requests tiles which are currently in view
|
||||||
|
|
||||||
use crate::coords::ZoomLevel;
|
use std::{
|
||||||
use crate::io::apc::{AsyncProcedureCall, AsyncProcedureFuture, Context, Input};
|
borrow::Borrow,
|
||||||
use crate::io::pipeline::PipelineContext;
|
cell::RefCell,
|
||||||
use crate::io::pipeline::Processable;
|
collections::{HashMap, HashSet},
|
||||||
use crate::io::tile_pipelines::build_vector_tile_pipeline;
|
future::Future,
|
||||||
use crate::stages::HeadedPipelineProcessor;
|
ops::Deref,
|
||||||
|
pin::Pin,
|
||||||
|
process::Output,
|
||||||
|
rc::Rc,
|
||||||
|
str::FromStr,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
context::MapContext,
|
context::MapContext,
|
||||||
coords::{ViewRegion, WorldTileCoords},
|
coords::{ViewRegion, WorldTileCoords, ZoomLevel},
|
||||||
error::Error,
|
error::Error,
|
||||||
io::{
|
io::{
|
||||||
|
apc::{AsyncProcedureCall, AsyncProcedureFuture, Context, Input},
|
||||||
|
pipeline::{PipelineContext, Processable},
|
||||||
source_client::{HttpSourceClient, SourceClient},
|
source_client::{HttpSourceClient, SourceClient},
|
||||||
|
tile_pipelines::build_vector_tile_pipeline,
|
||||||
tile_repository::TileRepository,
|
tile_repository::TileRepository,
|
||||||
TileRequest,
|
TileRequest,
|
||||||
},
|
},
|
||||||
schedule::Stage,
|
schedule::Stage,
|
||||||
|
stages::HeadedPipelineProcessor,
|
||||||
Environment, HttpClient, Scheduler, Style,
|
Environment, HttpClient, Scheduler, Style,
|
||||||
};
|
};
|
||||||
use std::borrow::Borrow;
|
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::collections::{HashMap, HashSet};
|
|
||||||
use std::future::Future;
|
|
||||||
use std::ops::Deref;
|
|
||||||
use std::pin::Pin;
|
|
||||||
use std::process::Output;
|
|
||||||
use std::rc::Rc;
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
pub struct RequestStage<E: Environment> {
|
pub struct RequestStage<E: Environment> {
|
||||||
apc: Rc<RefCell<E::AsyncProcedureCall>>,
|
apc: Rc<RefCell<E::AsyncProcedureCall>>,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
//! Utilities for the window system.
|
//! Utilities for the window system.
|
||||||
|
|
||||||
|
use std::{cell::RefCell, rc::Rc};
|
||||||
|
|
||||||
use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
|
use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
use crate::{Environment, HttpClient, InteractiveMapSchedule};
|
use crate::{Environment, HttpClient, InteractiveMapSchedule};
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,8 @@
|
|||||||
#![feature(allocator_api, new_uninit)]
|
#![feature(allocator_api, new_uninit)]
|
||||||
|
|
||||||
use std::borrow::BorrowMut;
|
use std::{borrow::BorrowMut, cell::RefCell, mem, ops::Deref, panic, rc::Rc};
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::ops::Deref;
|
|
||||||
use std::rc::Rc;
|
|
||||||
use std::{mem, panic};
|
|
||||||
|
|
||||||
use maplibre::io::scheduler::NopScheduler;
|
use maplibre::{io::scheduler::NopScheduler, Map, MapBuilder};
|
||||||
use maplibre::{Map, MapBuilder};
|
|
||||||
use maplibre_winit::winit::{WinitEnvironment, WinitMapWindowConfig};
|
use maplibre_winit::winit::{WinitEnvironment, WinitMapWindowConfig};
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
use maplibre::error::Error;
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
|
||||||
|
use maplibre::error::Error;
|
||||||
pub mod http_client;
|
pub mod http_client;
|
||||||
|
|
||||||
#[cfg(target_feature = "atomics")]
|
#[cfg(target_feature = "atomics")]
|
||||||
|
|||||||
@ -2,9 +2,7 @@
|
|||||||
//! web workers which can be used to execute work.
|
//! web workers which can be used to execute work.
|
||||||
//! Adopted from [wasm-bindgen example](https://github.com/rustwasm/wasm-bindgen/blob/0eba2efe45801b71f8873bc368c58a8ed8e894ff/examples/raytrace-parallel/src/pool.rs)
|
//! Adopted from [wasm-bindgen example](https://github.com/rustwasm/wasm-bindgen/blob/0eba2efe45801b71f8873bc368c58a8ed8e894ff/examples/raytrace-parallel/src/pool.rs)
|
||||||
|
|
||||||
use std::borrow::BorrowMut;
|
use std::{borrow::BorrowMut, cell::RefCell, future::Future, rc::Rc};
|
||||||
use std::future::Future;
|
|
||||||
use std::{cell::RefCell, rc::Rc};
|
|
||||||
|
|
||||||
use js_sys::Promise;
|
use js_sys::Promise;
|
||||||
use rand::prelude::*;
|
use rand::prelude::*;
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
use log::warn;
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
|
||||||
use super::pool::WorkerPool;
|
use log::warn;
|
||||||
use maplibre::{error::Error, io::scheduler::Scheduler};
|
use maplibre::{error::Error, io::scheduler::Scheduler};
|
||||||
use wasm_bindgen::{prelude::*, JsCast};
|
use wasm_bindgen::{prelude::*, JsCast};
|
||||||
use web_sys::Worker;
|
use web_sys::Worker;
|
||||||
|
|
||||||
|
use super::pool::WorkerPool;
|
||||||
|
|
||||||
pub struct WebWorkerPoolScheduler {
|
pub struct WebWorkerPoolScheduler {
|
||||||
pool: WorkerPool,
|
pool: WorkerPool,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,30 +1,38 @@
|
|||||||
use crate::platform::unsync::transferables::{
|
use std::{
|
||||||
InnerData, LinearTessellatedLayer, LinearTransferables,
|
borrow::Borrow,
|
||||||
|
cell::RefCell,
|
||||||
|
collections::HashMap,
|
||||||
|
marker::PhantomData,
|
||||||
|
mem,
|
||||||
|
mem::{size_of, MaybeUninit},
|
||||||
|
ops::Deref,
|
||||||
|
pin::Pin,
|
||||||
|
rc::Rc,
|
||||||
|
sync::{
|
||||||
|
mpsc,
|
||||||
|
mpsc::{Receiver, Sender},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
use crate::{MapType, WHATWGFetchHttpClient};
|
|
||||||
use js_sys::Uint8Array;
|
use js_sys::Uint8Array;
|
||||||
use maplibre::environment::Environment;
|
use maplibre::{
|
||||||
use maplibre::io::apc::{AsyncProcedure, AsyncProcedureCall, Context, Input, Message};
|
environment::Environment,
|
||||||
use maplibre::io::scheduler::Scheduler;
|
io::{
|
||||||
use maplibre::io::source_client::{HttpClient, HttpSourceClient, SourceClient};
|
apc::{AsyncProcedure, AsyncProcedureCall, Context, Input, Message},
|
||||||
use maplibre::io::transferables::Transferables;
|
scheduler::Scheduler,
|
||||||
|
source_client::{HttpClient, HttpSourceClient, SourceClient},
|
||||||
|
transferables::Transferables,
|
||||||
|
},
|
||||||
|
};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use std::borrow::Borrow;
|
use wasm_bindgen::{prelude::*, JsCast, JsValue};
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::marker::PhantomData;
|
|
||||||
use std::mem;
|
|
||||||
use std::mem::{size_of, MaybeUninit};
|
|
||||||
use std::ops::Deref;
|
|
||||||
use std::pin::Pin;
|
|
||||||
use std::rc::Rc;
|
|
||||||
use std::sync::mpsc;
|
|
||||||
use std::sync::mpsc::{Receiver, Sender};
|
|
||||||
use wasm_bindgen::prelude::*;
|
|
||||||
use wasm_bindgen::JsCast;
|
|
||||||
use wasm_bindgen::JsValue;
|
|
||||||
use web_sys::{DedicatedWorkerGlobalScope, Worker};
|
use web_sys::{DedicatedWorkerGlobalScope, Worker};
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
platform::unsync::transferables::{InnerData, LinearTessellatedLayer, LinearTransferables},
|
||||||
|
MapType, WHATWGFetchHttpClient,
|
||||||
|
};
|
||||||
|
|
||||||
type UsedTransferables = LinearTransferables;
|
type UsedTransferables = LinearTransferables;
|
||||||
type UsedHttpClient = WHATWGFetchHttpClient;
|
type UsedHttpClient = WHATWGFetchHttpClient;
|
||||||
type UsedContext = PassingContext;
|
type UsedContext = PassingContext;
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
use bytemuck::{TransparentWrapper, Zeroable};
|
use bytemuck::{TransparentWrapper, Zeroable};
|
||||||
use bytemuck_derive::{Pod, Zeroable};
|
use bytemuck_derive::{Pod, Zeroable};
|
||||||
use maplibre::benchmarking::tessellation::{IndexDataType, OverAlignedVertexBuffer};
|
use maplibre::{
|
||||||
use maplibre::coords::WorldTileCoords;
|
benchmarking::tessellation::{IndexDataType, OverAlignedVertexBuffer},
|
||||||
use maplibre::io::tile_repository::StoredLayer;
|
coords::WorldTileCoords,
|
||||||
use maplibre::io::transferables::{
|
io::{
|
||||||
TessellatedLayer, TileTessellated, Transferables, UnavailableLayer,
|
tile_repository::StoredLayer,
|
||||||
|
transferables::{TessellatedLayer, TileTessellated, Transferables, UnavailableLayer},
|
||||||
|
},
|
||||||
|
render::ShaderVertex,
|
||||||
|
tile::Layer,
|
||||||
};
|
};
|
||||||
use maplibre::render::ShaderVertex;
|
|
||||||
use maplibre::tile::Layer;
|
|
||||||
|
|
||||||
// FIXME: properly do this!, fix this whole file
|
// FIXME: properly do this!, fix this whole file
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user