From 784fbb2bc17d311fe3322cc48d2dca8a902161ca Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sat, 6 Oct 2018 00:40:48 +0200 Subject: Merge some byte swap/premultiply functions in their own crate --- components/canvas/webgl_thread.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/canvas/webgl_thread.rs') diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 413566e7817..cd8dbde18d2 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -2,13 +2,13 @@ * 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/. */ -use canvas_traits::canvas::byte_swap; use canvas_traits::webgl::*; use euclid::Size2D; use fnv::FnvHashMap; use gleam::gl; use ipc_channel::ipc::IpcBytesSender; use offscreen_gl_context::{GLContext, GLContextAttributes, GLLimits, NativeGLContextMethods}; +use pixels; use std::thread; use super::gl_context::{GLContextFactory, GLContextWrapper}; use webrender; @@ -562,7 +562,7 @@ impl WebGLThread { let src_slice = &orig_pixels[src_start .. src_start + stride]; (&mut pixels[dst_start .. dst_start + stride]).clone_from_slice(&src_slice[..stride]); } - byte_swap(&mut pixels); + pixels::byte_swap_colors_inplace(&mut pixels); pixels } -- cgit v1.2.3