mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Issue #20623: Check the input to WebGLRenderingContext's clear().
This commit is contained in:
parent
05fe8fa08d
commit
f32ffeb553
3 changed files with 36 additions and 0 deletions
|
@ -1866,6 +1866,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
if !self.validate_framebuffer_complete() {
|
||||
return;
|
||||
}
|
||||
if mask & !(constants::DEPTH_BUFFER_BIT | constants::STENCIL_BUFFER_BIT | constants::COLOR_BUFFER_BIT) != 0 {
|
||||
return self.webgl_error(InvalidValue);
|
||||
}
|
||||
|
||||
self.send_command(WebGLCommand::Clear(mask));
|
||||
self.mark_as_dirty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue