mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)
This commit is contained in:
parent
be4ac6c4cd
commit
36c0e387dd
10 changed files with 31 additions and 24 deletions
24
Cargo.lock
generated
24
Cargo.lock
generated
|
@ -269,7 +269,7 @@ dependencies = [
|
||||||
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -330,7 +330,7 @@ name = "cgl"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gfx_traits 0.0.1",
|
"gfx_traits 0.0.1",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1081,7 +1081,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gleam"
|
name = "gleam"
|
||||||
version = "0.4.29"
|
version = "0.4.34"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1307,7 +1307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -1559,7 +1559,7 @@ dependencies = [
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
|
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
|
||||||
"gfx 0.0.1",
|
"gfx 0.0.1",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"layout_thread 0.0.1",
|
"layout_thread 0.0.1",
|
||||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2051,7 +2051,7 @@ dependencies = [
|
||||||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2497,7 +2497,7 @@ dependencies = [
|
||||||
"encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2717,7 +2717,7 @@ dependencies = [
|
||||||
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libservo 0.0.1",
|
"libservo 0.0.1",
|
||||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2778,7 +2778,7 @@ dependencies = [
|
||||||
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"io-surface 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"io-surface 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3547,7 +3547,7 @@ dependencies = [
|
||||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3869,7 +3869,7 @@ dependencies = [
|
||||||
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
|
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
|
||||||
"checksum gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a80d6fe9e52f637df9afd4779449a7be17c39cc9c35b01589bb833f956ba596"
|
"checksum gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a80d6fe9e52f637df9afd4779449a7be17c39cc9c35b01589bb833f956ba596"
|
||||||
"checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a"
|
"checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a"
|
||||||
"checksum gleam 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)" = "b74def65dc2902b459fc7dd258b10695130408b79fd8f8beb59f475b1536ed81"
|
"checksum gleam 0.4.34 (registry+https://github.com/rust-lang/crates.io-index)" = "b4e5e2cdcadecdf3886e7808b6a38eae0a48dfe98c5c12b776fc861b80edf4a2"
|
||||||
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
||||||
"checksum glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90de8e0391e57098acfbfe693b23065e9186255d370ebae12c933b7d77df8424"
|
"checksum glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90de8e0391e57098acfbfe693b23065e9186255d370ebae12c933b7d77df8424"
|
||||||
"checksum glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "63a6e7c2846e12626455f45ebaff9d92161436dd0fa703d9d198012e528ca7b9"
|
"checksum glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "63a6e7c2846e12626455f45ebaff9d92161436dd0fa703d9d198012e528ca7b9"
|
||||||
|
|
|
@ -16,7 +16,7 @@ compositing = {path = "../compositing"}
|
||||||
cssparser = "0.23.0"
|
cssparser = "0.23.0"
|
||||||
euclid = "0.17"
|
euclid = "0.17"
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
gleam = "0.4.29"
|
gleam = "0.4.34"
|
||||||
ipc-channel = "0.10"
|
ipc-channel = "0.10"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
num-traits = "0.1.32"
|
num-traits = "0.1.32"
|
||||||
|
|
|
@ -893,8 +893,10 @@ impl WebGLImpl {
|
||||||
ctx.gl().delete_vertex_arrays(&[id.get()]),
|
ctx.gl().delete_vertex_arrays(&[id.get()]),
|
||||||
WebGLCommand::BindVertexArray(id) =>
|
WebGLCommand::BindVertexArray(id) =>
|
||||||
ctx.gl().bind_vertex_array(id.map_or(0, WebGLVertexArrayId::get)),
|
ctx.gl().bind_vertex_array(id.map_or(0, WebGLVertexArrayId::get)),
|
||||||
WebGLCommand::AliasedPointSizeRange(sender) => {
|
WebGLCommand::AliasedPointSizeRange(sender) =>
|
||||||
sender.send(ctx.gl().alias_point_size_range()).unwrap()
|
sender.send(ctx.gl().alias_point_size_range()).unwrap(),
|
||||||
|
WebGLCommand::AliasedLineWidthRange(sender) => {
|
||||||
|
sender.send(ctx.gl().alias_line_width_range()).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -275,6 +275,7 @@ pub enum WebGLCommand {
|
||||||
DeleteVertexArray(WebGLVertexArrayId),
|
DeleteVertexArray(WebGLVertexArrayId),
|
||||||
BindVertexArray(Option<WebGLVertexArrayId>),
|
BindVertexArray(Option<WebGLVertexArrayId>),
|
||||||
AliasedPointSizeRange(WebGLSender<(f32, f32)>),
|
AliasedPointSizeRange(WebGLSender<(f32, f32)>),
|
||||||
|
AliasedLineWidthRange(WebGLSender<(f32, f32)>),
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! define_resource_id_struct {
|
macro_rules! define_resource_id_struct {
|
||||||
|
@ -548,6 +549,7 @@ impl fmt::Debug for WebGLCommand {
|
||||||
DeleteVertexArray(..) => "DeleteVertexArray",
|
DeleteVertexArray(..) => "DeleteVertexArray",
|
||||||
BindVertexArray(..) => "BindVertexArray",
|
BindVertexArray(..) => "BindVertexArray",
|
||||||
AliasedPointSizeRange(..) => "AliasedPointSizeRange",
|
AliasedPointSizeRange(..) => "AliasedPointSizeRange",
|
||||||
|
AliasedLineWidthRange(..) => "AliasedLineWidthRange",
|
||||||
};
|
};
|
||||||
|
|
||||||
write!(f, "CanvasWebGLMsg::{}(..)", name)
|
write!(f, "CanvasWebGLMsg::{}(..)", name)
|
||||||
|
|
|
@ -13,7 +13,7 @@ path = "lib.rs"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
euclid = "0.17"
|
euclid = "0.17"
|
||||||
gfx_traits = {path = "../gfx_traits"}
|
gfx_traits = {path = "../gfx_traits"}
|
||||||
gleam = "0.4.29"
|
gleam = "0.4.34"
|
||||||
image = "0.18"
|
image = "0.18"
|
||||||
ipc-channel = "0.10"
|
ipc-channel = "0.10"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
|
|
@ -45,7 +45,7 @@ domobject_derive = {path = "../domobject_derive"}
|
||||||
encoding_rs = "0.7"
|
encoding_rs = "0.7"
|
||||||
euclid = "0.17"
|
euclid = "0.17"
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
gleam = "0.4.29"
|
gleam = "0.4.34"
|
||||||
half = "1.0"
|
half = "1.0"
|
||||||
html5ever = "0.22"
|
html5ever = "0.22"
|
||||||
hyper = "0.10"
|
hyper = "0.10"
|
||||||
|
|
|
@ -1326,6 +1326,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
||||||
[width, height].to_jsval(cx, rval.handle_mut());
|
[width, height].to_jsval(cx, rval.handle_mut());
|
||||||
return rval.get();
|
return rval.get();
|
||||||
}
|
}
|
||||||
|
constants::ALIASED_LINE_WIDTH_RANGE => {
|
||||||
|
let (sender, receiver) = webgl_channel().unwrap();
|
||||||
|
self.send_command(WebGLCommand::AliasedLineWidthRange(sender));
|
||||||
|
let (width, height) = receiver.recv().unwrap();
|
||||||
|
rooted!(in(cx) let mut rval = UndefinedValue());
|
||||||
|
[width, height].to_jsval(cx, rval.handle_mut());
|
||||||
|
return rval.get();
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if !self.extension_manager.is_get_parameter_name_enabled(parameter) {
|
if !self.extension_manager.is_get_parameter_name_enabled(parameter) {
|
||||||
self.webgl_error(WebGLError::InvalidEnum);
|
self.webgl_error(WebGLError::InvalidEnum);
|
||||||
|
|
|
@ -40,7 +40,7 @@ devtools_traits = {path = "../devtools_traits"}
|
||||||
env_logger = "0.5"
|
env_logger = "0.5"
|
||||||
euclid = "0.17"
|
euclid = "0.17"
|
||||||
gfx = {path = "../gfx"}
|
gfx = {path = "../gfx"}
|
||||||
gleam = "0.4.29"
|
gleam = "0.4.34"
|
||||||
ipc-channel = "0.10"
|
ipc-channel = "0.10"
|
||||||
layout_thread = {path = "../layout_thread"}
|
layout_thread = {path = "../layout_thread"}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
|
@ -37,7 +37,7 @@ unstable = ["libservo/unstable"]
|
||||||
backtrace = "0.3"
|
backtrace = "0.3"
|
||||||
bitflags = "1.0"
|
bitflags = "1.0"
|
||||||
euclid = "0.17"
|
euclid = "0.17"
|
||||||
gleam = "0.4.29"
|
gleam = "0.4.34"
|
||||||
glutin = "0.13"
|
glutin = "0.13"
|
||||||
libservo = {path = "../../components/servo"}
|
libservo = {path = "../../components/servo"}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[quickCheckAPI-L_S.html]
|
|
||||||
type: testharness
|
|
||||||
[WebGL test #0: testValidArgs]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue