mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Store Option<ImageInfo> instead of making fields optional
This commit is contained in:
parent
48d918dcde
commit
a4fa36f9fb
4 changed files with 47 additions and 69 deletions
|
@ -221,12 +221,16 @@ impl WebGLFramebuffer {
|
|||
Some(WebGLFramebufferAttachment::Texture {
|
||||
texture: ref att_tex,
|
||||
level,
|
||||
}) => {
|
||||
let info = att_tex.image_info_at_face(0, level as u32);
|
||||
(
|
||||
info.internal_format().map(|t| t.as_gl_constant()),
|
||||
}) => match att_tex.image_info_at_face(0, level as u32) {
|
||||
Some(info) => (
|
||||
Some(info.internal_format().as_gl_constant()),
|
||||
Some((info.width() as i32, info.height() as i32)),
|
||||
)
|
||||
),
|
||||
None => {
|
||||
self.status
|
||||
.set(constants::FRAMEBUFFER_INCOMPLETE_ATTACHMENT);
|
||||
return;
|
||||
},
|
||||
},
|
||||
None => (None, None),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue