mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #24616 - teapotd:imageinfo-option-refactoring, r=jdm
Store Option<ImageInfo> instead of making fields of ImageInfo optional Fixes #24582 --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #24582 - [X] These changes do not require tests
This commit is contained in:
commit
56537fad58
4 changed files with 47 additions and 69 deletions
|
@ -264,12 +264,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