diff options
Diffstat (limited to 'components/canvas')
-rw-r--r-- | components/canvas/lib.rs | 2 | ||||
-rw-r--r-- | components/canvas/webgl_paint_task.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/components/canvas/lib.rs b/components/canvas/lib.rs index cf865c2f163..87b61010278 100644 --- a/components/canvas/lib.rs +++ b/components/canvas/lib.rs @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#![feature(clone_from_slice)] #![feature(nonzero)] -#![feature(slice_bytes)] #![feature(plugin)] #![plugin(plugins)] diff --git a/components/canvas/webgl_paint_task.rs b/components/canvas/webgl_paint_task.rs index f5cd8a87fab..6a79c967f26 100644 --- a/components/canvas/webgl_paint_task.rs +++ b/components/canvas/webgl_paint_task.rs @@ -13,7 +13,6 @@ use ipc_channel::router::ROUTER; use layers::platform::surface::NativeSurface; use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes}; use std::borrow::ToOwned; -use std::slice::bytes::copy_memory; use std::sync::mpsc::{Sender, channel}; use util::task::spawn_named; use util::vec::byte_swap; @@ -365,7 +364,7 @@ impl WebGLPaintTask { let dst_start = y * stride; let src_start = (height - y - 1) * stride; let src_slice = &orig_pixels[src_start .. src_start + stride]; - copy_memory(&src_slice[..stride], &mut pixels[dst_start .. dst_start + stride]); + (&mut pixels[dst_start .. dst_start + stride]).clone_from_slice(&src_slice[..stride]); } // rgba -> bgra |