From b0719380e8dbe672782ec6aafc873ae12313350c Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Tue, 25 Apr 2017 19:25:29 +0200 Subject: [PATCH] Antialias shall not cause a failure to create a WebGLRenderingContext --- Cargo.toml | 2 +- src/draw_buffer.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3a90603..a1c4c9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "offscreen_gl_context" license = "MIT / Apache-2.0" -version = "0.8.7" +version = "0.8.8" authors = ["Emilio Cobos Álvarez ", "The Servo Project Developers"] description = "Creation and manipulation of HW accelerated offscreen rendering contexts in multiple platforms. Originally intended for the Servo project's WebGL implementation." repository = "https://github.com/emilio/rust-offscreen-rendering-context" diff --git a/src/draw_buffer.rs b/src/draw_buffer.rs index e1b761c..d5772a6 100644 --- a/src/draw_buffer.rs +++ b/src/draw_buffer.rs @@ -91,8 +91,10 @@ impl DrawBuffer { debug!("Creating draw buffer {:?}, {:?}, attrs: {:?}, caps: {:?}", size, color_attachment_type, attrs, capabilities); + // WebGL spec: antialias attribute is a requests, not a requirement. + // If not supported it shall not cause a failure to create a WebGLRenderingContext. if attrs.antialias && capabilities.max_samples == 0 { - return Err("The given GLContext doesn't support requested antialising"); + error!("The given GLContext doesn't support requested antialising"); } if attrs.preserve_drawing_buffer {