diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-10-06 00:40:48 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-10-06 01:11:55 +0200 |
commit | 784fbb2bc17d311fe3322cc48d2dca8a902161ca (patch) | |
tree | 2194d8d1bb0fbb7d7c50f3fbcc83b40bb28b3ea8 /components/canvas/webgl_thread.rs | |
parent | a2e3dd4e8636b7125140850dc4bc95433e801e77 (diff) | |
download | servo-784fbb2bc17d311fe3322cc48d2dca8a902161ca.tar.gz servo-784fbb2bc17d311fe3322cc48d2dca8a902161ca.zip |
Merge some byte swap/premultiply functions in their own crate
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r-- | components/canvas/webgl_thread.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<VR: WebVRRenderHandler + 'static> WebGLThread<VR> { 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 } |