diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2015-10-15 18:47:04 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-10-16 01:20:27 +0530 |
commit | 8819f0d8b86a59acbad9b3127171fce4728b0cdd (patch) | |
tree | f66b555479dcc37f2cee6fd461d00ae8c318180e /components/script/dom/webglrenderingcontext.rs | |
parent | 7022bedba3ec9652490ce693e15674cf1ff7e36c (diff) | |
download | servo-8819f0d8b86a59acbad9b3127171fce4728b0cdd.tar.gz servo-8819f0d8b86a59acbad9b3127171fce4728b0cdd.zip |
Update script to work with lint changes
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 2fd87cfd19d..f5a3569da13 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -147,10 +147,10 @@ impl WebGLRenderingContext { } } - pub fn bound_texture_for(&self, target: u32) -> Option<JS<WebGLTexture>> { + pub fn bound_texture_for(&self, target: u32) -> Option<Root<WebGLTexture>> { match target { - constants::TEXTURE_2D => self.bound_texture_2d.get(), - constants::TEXTURE_CUBE_MAP => self.bound_texture_cube_map.get(), + constants::TEXTURE_2D => self.bound_texture_2d.get().map(|t| t.root()), + constants::TEXTURE_CUBE_MAP => self.bound_texture_cube_map.get().map(|t| t.root()), _ => unreachable!(), } @@ -906,7 +906,6 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { constants::TEXTURE_2D | constants::TEXTURE_CUBE_MAP => { if let Some(texture) = self.bound_texture_for(target) { - let texture = texture.root(); let result = texture.r().tex_parameter(target, name, TexParameterValue::Float(value)); handle_potential_webgl_error!(self, result); } else { @@ -924,7 +923,6 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { constants::TEXTURE_2D | constants::TEXTURE_CUBE_MAP => { if let Some(texture) = self.bound_texture_for(target) { - let texture = texture.root(); let result = texture.r().tex_parameter(target, name, TexParameterValue::Int(value)); handle_potential_webgl_error!(self, result); } else { |