aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglrenderbuffer.rs
diff options
context:
space:
mode:
authorPyfisch <pyfisch@gmail.com>2018-11-06 13:01:35 +0100
committerPyfisch <pyfisch@gmail.com>2018-11-06 22:30:31 +0100
commitcb07debcb6f3d3561177ce536c320986720791b7 (patch)
treeccac4d5a48b3112230f3fc2e873753dd7263e9fb /components/script/dom/webglrenderbuffer.rs
parentbf47f90da667e95eaffc8fee36ca8a88e72e276c (diff)
downloadservo-cb07debcb6f3d3561177ce536c320986720791b7.tar.gz
servo-cb07debcb6f3d3561177ce536c320986720791b7.zip
Format remaining files
Diffstat (limited to 'components/script/dom/webglrenderbuffer.rs')
-rw-r--r--components/script/dom/webglrenderbuffer.rs24
1 files changed, 17 insertions, 7 deletions
diff --git a/components/script/dom/webglrenderbuffer.rs b/components/script/dom/webglrenderbuffer.rs
index 7176194e6a9..616bfc353e3 100644
--- a/components/script/dom/webglrenderbuffer.rs
+++ b/components/script/dom/webglrenderbuffer.rs
@@ -122,9 +122,9 @@ impl WebGLRenderbuffer {
// Validate the internal_format, and save it for completeness
// validation.
let actual_format = match internal_format {
- constants::RGBA4 |
- constants::DEPTH_COMPONENT16 |
- constants::STENCIL_INDEX8 => internal_format,
+ constants::RGBA4 | constants::DEPTH_COMPONENT16 | constants::STENCIL_INDEX8 => {
+ internal_format
+ },
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.8
constants::DEPTH_STENCIL => WebGL2RenderingContextConstants::DEPTH24_STENCIL8,
constants::RGB5_A1 => {
@@ -134,7 +134,7 @@ impl WebGLRenderbuffer {
} else {
WebGL2RenderingContextConstants::RGBA8
}
- }
+ },
constants::RGB565 => {
// RGB565 is not supported on desktop GL.
if is_gles() {
@@ -142,16 +142,26 @@ impl WebGLRenderbuffer {
} else {
WebGL2RenderingContextConstants::RGB8
}
- }
+ },
EXTColorBufferHalfFloatConstants::RGBA16F_EXT |
EXTColorBufferHalfFloatConstants::RGB16F_EXT => {
- if !self.upcast().context().extension_manager().is_half_float_buffer_renderable() {
+ if !self
+ .upcast()
+ .context()
+ .extension_manager()
+ .is_half_float_buffer_renderable()
+ {
return Err(WebGLError::InvalidEnum);
}
internal_format
},
WEBGLColorBufferFloatConstants::RGBA32F_EXT => {
- if !self.upcast().context().extension_manager().is_float_buffer_renderable() {
+ if !self
+ .upcast()
+ .context()
+ .extension_manager()
+ .is_float_buffer_renderable()
+ {
return Err(WebGLError::InvalidEnum);
}
internal_format