Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
14
third-party/vendor/image/benches/copy_from.rs
vendored
Normal file
14
third-party/vendor/image/benches/copy_from.rs
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use image::{GenericImage, ImageBuffer, Rgba};
|
||||
|
||||
pub fn bench_copy_from(c: &mut Criterion) {
|
||||
let src = ImageBuffer::from_pixel(2048, 2048, Rgba([255u8, 0, 0, 255]));
|
||||
let mut dst = ImageBuffer::from_pixel(2048, 2048, Rgba([0u8, 0, 0, 255]));
|
||||
|
||||
c.bench_function("copy_from", |b| {
|
||||
b.iter(|| dst.copy_from(black_box(&src), 0, 0))
|
||||
});
|
||||
}
|
||||
|
||||
criterion_group!(benches, bench_copy_from);
|
||||
criterion_main!(benches);
|
||||
Loading…
Add table
Add a link
Reference in a new issue