diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-12-14 08:31:30 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-12-28 13:17:47 +0100 |
commit | be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8 (patch) | |
tree | db8be2dfee5cff6ef0c42e8d46c623eb87529e5a /components/script/dom/webglrenderingcontext.rs | |
parent | 82fc6d9f49a657e2857da3f1b22140e3b6efdf09 (diff) | |
download | servo-be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8.tar.gz servo-be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8.zip |
Rustfmt has changed its default style :/
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index c7896b42436..726a59db4ad 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -2,15 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -#[cfg(feature = "webgl_backtrace")] -use backtrace::Backtrace; -use canvas_traits::webgl::WebGLError::*; -use canvas_traits::webgl::{ - webgl_channel, AlphaTreatment, DOMToTextureCommand, Parameter, TexDataType, TexFormat, - TexParameter, WebGLCommand, WebGLCommandBacktrace, WebGLContextShareMode, WebGLError, - WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender, WebGLProgramId, WebGLResult, - WebGLSLVersion, WebGLSender, WebGLVersion, WebVRCommand, YAxisTreatment, -}; use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants; use crate::dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants; use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants; @@ -55,6 +46,15 @@ use crate::dom::webgltexture::{TexParameterValue, WebGLTexture}; use crate::dom::webgluniformlocation::WebGLUniformLocation; use crate::dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES; use crate::dom::window::Window; +#[cfg(feature = "webgl_backtrace")] +use backtrace::Backtrace; +use canvas_traits::webgl::WebGLError::*; +use canvas_traits::webgl::{ + webgl_channel, AlphaTreatment, DOMToTextureCommand, Parameter, TexDataType, TexFormat, + TexParameter, WebGLCommand, WebGLCommandBacktrace, WebGLContextShareMode, WebGLError, + WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender, WebGLProgramId, WebGLResult, + WebGLSLVersion, WebGLSender, WebGLVersion, WebVRCommand, YAxisTreatment, +}; use dom_struct::dom_struct; use euclid::{Point2D, Rect, Size2D}; use ipc_channel::ipc::{self, IpcSharedMemory}; @@ -1913,9 +1913,10 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11 fn Clear(&self, mask: u32) { handle_potential_webgl_error!(self, self.validate_framebuffer(), return); - if mask & !(constants::DEPTH_BUFFER_BIT | - constants::STENCIL_BUFFER_BIT | - constants::COLOR_BUFFER_BIT) != + if mask & + !(constants::DEPTH_BUFFER_BIT | + constants::STENCIL_BUFFER_BIT | + constants::COLOR_BUFFER_BIT) != 0 { return self.webgl_error(InvalidValue); |