diff options
author | teapotd <teapot404@gmail.com> | 2019-10-31 19:20:52 +0100 |
---|---|---|
committer | teapotd <teapot404@gmail.com> | 2019-11-01 14:48:16 +0100 |
commit | a4fa36f9fb540357b8c9452598b729fba6688c46 (patch) | |
tree | a8f6c58f02634c3513c4784b8af465c548f55088 /components/script/dom/webgl_validations | |
parent | 48d918dcdead5fcf38dbda1dfc0d0ca8284108c2 (diff) | |
download | servo-a4fa36f9fb540357b8c9452598b729fba6688c46.tar.gz servo-a4fa36f9fb540357b8c9452598b729fba6688c46.zip |
Store Option<ImageInfo> instead of making fields optional
Diffstat (limited to 'components/script/dom/webgl_validations')
-rw-r--r-- | components/script/dom/webgl_validations/tex_image_2d.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/webgl_validations/tex_image_2d.rs b/components/script/dom/webgl_validations/tex_image_2d.rs index 329ffd10349..fc5919132cf 100644 --- a/components/script/dom/webgl_validations/tex_image_2d.rs +++ b/components/script/dom/webgl_validations/tex_image_2d.rs @@ -613,7 +613,7 @@ impl<'a> WebGLValidator for CompressedTexSubImage2DValidator<'a> { compression, } = self.compression_validator.validate()?; - let tex_info = texture.image_info_for_target(&target, level); + let tex_info = texture.image_info_for_target(&target, level).unwrap(); // GL_INVALID_VALUE is generated if: // - xoffset or yoffset is less than 0 @@ -630,7 +630,7 @@ impl<'a> WebGLValidator for CompressedTexSubImage2DValidator<'a> { // GL_INVALID_OPERATION is generated if format does not match // internal_format. - if compression.format != tex_info.internal_format().unwrap() { + if compression.format != tex_info.internal_format() { context.webgl_error(InvalidOperation); return Err(TexImageValidationError::TextureFormatMismatch); } |