mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Update arrayvec.
This commit is contained in:
parent
72fd95f613
commit
a7c87af9ca
8 changed files with 21 additions and 20 deletions
9
Cargo.lock
generated
9
Cargo.lock
generated
|
@ -147,6 +147,9 @@ name = "arrayvec"
|
|||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ash"
|
||||
|
@ -5130,7 +5133,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"accountable-refcell",
|
||||
"app_units",
|
||||
"arrayvec 0.5.1",
|
||||
"arrayvec 0.7.1",
|
||||
"backtrace",
|
||||
"base64 0.10.1",
|
||||
"bitflags",
|
||||
|
@ -6052,7 +6055,7 @@ name = "style"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"app_units",
|
||||
"arrayvec 0.5.1",
|
||||
"arrayvec 0.7.1",
|
||||
"atomic_refcell",
|
||||
"bindgen",
|
||||
"bitflags",
|
||||
|
@ -7060,7 +7063,7 @@ dependencies = [
|
|||
name = "webgpu"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"arrayvec 0.5.1",
|
||||
"arrayvec 0.7.1",
|
||||
"euclid",
|
||||
"ipc-channel",
|
||||
"log",
|
||||
|
|
|
@ -32,7 +32,7 @@ serde_json = "1.0"
|
|||
[dependencies]
|
||||
accountable-refcell = { version = "0.2.0", optional = true }
|
||||
app_units = "0.7"
|
||||
arrayvec = "0.5.1"
|
||||
arrayvec = "0.7"
|
||||
backtrace = "0.3"
|
||||
base64 = "0.10.1"
|
||||
bitflags = "1.0"
|
||||
|
|
|
@ -135,7 +135,7 @@ impl GPUCanvasContextMethods for GPUCanvasContext {
|
|||
}
|
||||
*self.swap_chain.borrow_mut() = None;
|
||||
|
||||
let mut buffer_ids = ArrayVec::<[id::BufferId; PRESENTATION_BUFFER_COUNT]>::new();
|
||||
let mut buffer_ids = ArrayVec::<id::BufferId, PRESENTATION_BUFFER_COUNT>::new();
|
||||
for _ in 0..PRESENTATION_BUFFER_COUNT {
|
||||
buffer_ids.push(
|
||||
self.global()
|
||||
|
|
|
@ -31,7 +31,7 @@ gecko_profiler = []
|
|||
|
||||
[dependencies]
|
||||
app_units = "0.7"
|
||||
arrayvec = "0.5"
|
||||
arrayvec = "0.7"
|
||||
atomic_refcell = "0.1"
|
||||
bitflags = "1.0"
|
||||
byteorder = "1.0"
|
||||
|
|
|
@ -69,7 +69,7 @@ pub const WORK_UNIT_MAX: usize = 16;
|
|||
|
||||
/// A set of nodes, sized to the work unit. This gets copied when sent to other
|
||||
/// threads, so we keep it compact.
|
||||
type WorkUnit<N> = ArrayVec<[SendNode<N>; WORK_UNIT_MAX]>;
|
||||
type WorkUnit<N> = ArrayVec<SendNode<N>, WORK_UNIT_MAX>;
|
||||
|
||||
/// A callback to create our thread local context. This needs to be
|
||||
/// out of line so we don't allocate stack space for the entire struct
|
||||
|
|
|
@ -2534,11 +2534,8 @@ impl PropertyDeclaration {
|
|||
}
|
||||
}
|
||||
|
||||
type SubpropertiesArray<T> =
|
||||
[T; ${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
||||
if data.shorthands_except_all() else 0}];
|
||||
|
||||
type SubpropertiesVec<T> = ArrayVec<SubpropertiesArray<T>>;
|
||||
type SubpropertiesVec<T> = ArrayVec<T, ${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
||||
if data.shorthands_except_all() else 0}>;
|
||||
|
||||
/// A stack-allocated vector of `PropertyDeclaration`
|
||||
/// large enough to parse one CSS `key: value` declaration.
|
||||
|
@ -2594,7 +2591,8 @@ impl SourcePropertyDeclaration {
|
|||
|
||||
/// Return type of SourcePropertyDeclaration::drain
|
||||
pub struct SourcePropertyDeclarationDrain<'a> {
|
||||
declarations: ArrayVecDrain<'a, SubpropertiesArray<PropertyDeclaration>>,
|
||||
declarations: ArrayVecDrain<'a, PropertyDeclaration, ${max(len(s.sub_properties) for s in data.shorthands_except_all()) \
|
||||
if data.shorthands_except_all() else 0}>,
|
||||
all_shorthand: AllShorthand,
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ name = "webgpu"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
arrayvec = { version = "0.5.1", features = ["serde"] }
|
||||
arrayvec = { version = "0.7", features = ["serde"] }
|
||||
euclid = "0.20"
|
||||
ipc-channel = "0.14"
|
||||
log = "0.4"
|
||||
|
|
|
@ -164,7 +164,7 @@ pub enum WebGPURequest {
|
|||
},
|
||||
CreateSwapChain {
|
||||
device_id: id::DeviceId,
|
||||
buffer_ids: ArrayVec<[id::BufferId; PRESENTATION_BUFFER_COUNT]>,
|
||||
buffer_ids: ArrayVec<id::BufferId, PRESENTATION_BUFFER_COUNT>,
|
||||
external_id: u64,
|
||||
sender: IpcSender<webrender_api::ImageKey>,
|
||||
image_desc: webrender_api::ImageDescriptor,
|
||||
|
@ -755,10 +755,10 @@ impl<'a> WGPU<'a> {
|
|||
size: Size2D::new(width, height),
|
||||
unassigned_buffer_ids: buffer_ids,
|
||||
available_buffer_ids: ArrayVec::<
|
||||
[id::BufferId; PRESENTATION_BUFFER_COUNT],
|
||||
id::BufferId, PRESENTATION_BUFFER_COUNT,
|
||||
>::new(),
|
||||
queued_buffer_ids: ArrayVec::<
|
||||
[id::BufferId; PRESENTATION_BUFFER_COUNT],
|
||||
id::BufferId, PRESENTATION_BUFFER_COUNT,
|
||||
>::new(),
|
||||
buffer_stride,
|
||||
image_key,
|
||||
|
@ -1366,9 +1366,9 @@ pub struct PresentationData {
|
|||
queue_id: id::QueueId,
|
||||
pub data: Vec<u8>,
|
||||
pub size: Size2D<i32>,
|
||||
unassigned_buffer_ids: ArrayVec<[id::BufferId; PRESENTATION_BUFFER_COUNT]>,
|
||||
available_buffer_ids: ArrayVec<[id::BufferId; PRESENTATION_BUFFER_COUNT]>,
|
||||
queued_buffer_ids: ArrayVec<[id::BufferId; PRESENTATION_BUFFER_COUNT]>,
|
||||
unassigned_buffer_ids: ArrayVec<id::BufferId, PRESENTATION_BUFFER_COUNT>,
|
||||
available_buffer_ids: ArrayVec<id::BufferId, PRESENTATION_BUFFER_COUNT>,
|
||||
queued_buffer_ids: ArrayVec<id::BufferId, PRESENTATION_BUFFER_COUNT>,
|
||||
buffer_stride: u32,
|
||||
image_key: webrender_api::ImageKey,
|
||||
image_desc: webrender_api::ImageDescriptor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue