mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
webgl: Update FBO status when textures or RBs are reallocated.
FBO status is supposed to depend on the size of the attachments all matching, so we need to re-check when it changes. We don't ensure matching yet, but this will prevent regressions when we do.
This commit is contained in:
parent
8e681dddc1
commit
d77373654a
2 changed files with 45 additions and 8 deletions
|
@ -465,7 +465,11 @@ impl WebGLRenderingContext {
|
|||
|
||||
self.ipc_renderer
|
||||
.send(CanvasMsg::WebGL(msg))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
if let Some(fb) = self.bound_framebuffer.get() {
|
||||
fb.invalidate_texture(&*texture);
|
||||
}
|
||||
}
|
||||
|
||||
fn tex_sub_image_2d(&self,
|
||||
|
@ -2621,7 +2625,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
}
|
||||
|
||||
match self.bound_renderbuffer.get() {
|
||||
Some(rb) => handle_potential_webgl_error!(self, rb.storage(internal_format, width, height)),
|
||||
Some(rb) => {
|
||||
handle_potential_webgl_error!(self, rb.storage(internal_format, width, height));
|
||||
if let Some(fb) = self.bound_framebuffer.get() {
|
||||
fb.invalidate_renderbuffer(&*rb);
|
||||
}
|
||||
}
|
||||
None => self.webgl_error(InvalidOperation),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue