aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-10-18 14:16:01 -0400
committerGitHub <noreply@github.com>2018-10-18 14:16:01 -0400
commitbcafe4188f347af6089e801d8c9c9d2f3a4ca017 (patch)
treedf09187293b7ec30608336624c38d4d1aecb3375 /components/script
parentc3c68983b7c10731ce13f055a9d778e9b8b1bd94 (diff)
parent8828925f4f2be35b8996a8db1acc85d5f063144c (diff)
downloadservo-bcafe4188f347af6089e801d8c9c9d2f3a4ca017.tar.gz
servo-bcafe4188f347af6089e801d8c9c9d2f3a4ca017.zip
Auto merge of #21961 - servo:webgl, r=jdm
Properly support gl_PointSize and gl_PointCoord Fixes #21719. Fixes #20993. Fixes #20992. Fixes #21007. Fixes #20979. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21961) <!-- Reviewable:end -->
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/webgl_extensions/ext/extshadertexturelod.rs4
-rw-r--r--components/script/dom/webgl_extensions/ext/oeselementindexuint.rs4
-rw-r--r--components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs4
-rw-r--r--components/script/dom/webglrenderbuffer.rs4
-rw-r--r--components/script/dom/webglrenderingcontext.rs6
5 files changed, 8 insertions, 14 deletions
diff --git a/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs b/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs
index 9766032c0c5..2082d771f02 100644
--- a/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs
+++ b/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use canvas_traits::webgl::WebGLVersion;
+use canvas_traits::webgl::{WebGLVersion, is_gles};
use dom::bindings::codegen::Bindings::EXTShaderTextureLodBinding;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::{WebGLRenderingContext, is_gles};
+use dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs b/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs
index 48e60b316dd..c3c96bd5891 100644
--- a/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs
+++ b/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use canvas_traits::webgl::WebGLVersion;
+use canvas_traits::webgl::{WebGLVersion, is_gles};
use dom::bindings::codegen::Bindings::OESElementIndexUintBinding;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::{WebGLRenderingContext, is_gles};
+use dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs b/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs
index 966a03505b6..a9142d2fb88 100644
--- a/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs
+++ b/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use canvas_traits::webgl::WebGLVersion;
+use canvas_traits::webgl::{WebGLVersion, is_gles};
use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding;
use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::{WebGLRenderingContext, is_gles};
+use dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webglrenderbuffer.rs b/components/script/dom/webglrenderbuffer.rs
index edfed388c39..7b9863257de 100644
--- a/components/script/dom/webglrenderbuffer.rs
+++ b/components/script/dom/webglrenderbuffer.rs
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
-use canvas_traits::webgl::{webgl_channel, WebGLCommand, WebGLError, WebGLRenderbufferId, WebGLResult};
+use canvas_traits::webgl::{WebGLCommand, WebGLError, WebGLRenderbufferId, WebGLResult, is_gles, webgl_channel};
use dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as WebGl2Constants;
use dom::bindings::codegen::Bindings::WebGLRenderbufferBinding;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
@@ -11,7 +11,7 @@ use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
use dom::bindings::root::DomRoot;
use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::{WebGLRenderingContext, is_gles};
+use dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index c8f2b1fce4f..123e3e490be 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -73,12 +73,6 @@ use std::cmp;
use std::ptr::{self, NonNull};
use webrender_api;
-pub fn is_gles() -> bool {
- // TODO: align this with the actual kind of graphics context in use, rather than
- // making assumptions based on platform
- cfg!(any(target_os = "android", target_os = "ios"))
-}
-
// From the GLES 2.0.25 spec, page 85:
//
// "If a texture that is currently bound to one of the targets