aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2018-04-04 16:22:28 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2018-04-05 09:30:21 +0200
commit7b4d66b621f28cedb47fd8400a6d8fcb75c22b86 (patch)
tree1e77d8e6f1aa83553224779261caee6f0cdf8214 /components/script
parentfc6335c01d2f4e3048f4043070a79100faff16e6 (diff)
downloadservo-7b4d66b621f28cedb47fd8400a6d8fcb75c22b86.tar.gz
servo-7b4d66b621f28cedb47fd8400a6d8fcb75c22b86.zip
Manually clamp the argument of WebGLRenderingContext.clearDepth
Better be safe than to feed stuff to some GPU driver that wouldn't clamp it.
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/webglrenderingcontext.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 5819b33357e..81f28ceb1cd 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -1876,7 +1876,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
fn ClearDepth(&self, depth: f32) {
- self.send_command(WebGLCommand::ClearDepth(depth as f64))
+ self.send_command(WebGLCommand::ClearDepth(depth))
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3