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