diff --git a/Cargo.lock b/Cargo.lock index cc221392cf233..3853d14abddd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "Inflector" version = "0.11.2" diff --git a/gfx/wr/Cargo.lock b/gfx/wr/Cargo.lock index be5208b83d351..0b90829ef71a6 100644 --- a/gfx/wr/Cargo.lock +++ b/gfx/wr/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "adler32" version = "1.0.2" diff --git a/gfx/wr/webrender/src/device/gl.rs b/gfx/wr/webrender/src/device/gl.rs index 92a0220cfa2f0..7424df50f4e45 100644 --- a/gfx/wr/webrender/src/device/gl.rs +++ b/gfx/wr/webrender/src/device/gl.rs @@ -27,7 +27,7 @@ use std::ptr; use std::rc::Rc; use std::slice; use std::sync::Arc; -use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; +use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread; use webrender_build::shader::ProgramSourceDigest; use webrender_build::shader::{parse_shader_source, shader_source_from_file}; @@ -44,7 +44,7 @@ pub struct GpuFrameId(usize); /// to be atomic per se, but we make it atomic to satisfy the thread safety /// invariants in the type system. We could also put the value in TLS, but that /// would be more expensive to access. -static GPU_BYTES_ALLOCATED: AtomicUsize = ATOMIC_USIZE_INIT; +static GPU_BYTES_ALLOCATED: AtomicUsize = AtomicUsize::new(0); /// Returns the number of GPU bytes currently allocated. pub fn total_gpu_bytes_allocated() -> usize { diff --git a/gfx/wr/webrender/src/picture.rs b/gfx/wr/webrender/src/picture.rs index 7aafd404a6ad7..f8bee9f6c2fd1 100644 --- a/gfx/wr/webrender/src/picture.rs +++ b/gfx/wr/webrender/src/picture.rs @@ -34,7 +34,7 @@ use scene::{FilterOpHelpers, SceneProperties}; use scene_builder::Interners; use smallvec::SmallVec; use std::{mem, u16}; -use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; +use std::sync::atomic::{AtomicUsize, Ordering}; use texture_cache::{Eviction, TextureCacheHandle}; use tiling::RenderTargetKind; use util::{ComparableVec, TransformedRectKind, MatrixHelpers, MaxRect}; @@ -116,7 +116,7 @@ const MAX_PRIMS_TO_SEARCH: usize = 128; /// Used to get unique tile IDs, even when the tile cache is /// destroyed between display lists / scenes. -static NEXT_TILE_ID: AtomicUsize = ATOMIC_USIZE_INIT; +static NEXT_TILE_ID: AtomicUsize = AtomicUsize::new(0); fn clamp(value: i32, low: i32, high: i32) -> i32 { value.max(low).min(high)