mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
Implement gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE)
This commit is contained in:
parent
2ab34d5969
commit
d6ebbd3e17
13 changed files with 230 additions and 32 deletions
|
@ -16,7 +16,7 @@ compositing = {path = "../compositing"}
|
|||
cssparser = "0.23.0"
|
||||
euclid = "0.17"
|
||||
fnv = "1.0"
|
||||
gleam = "0.4"
|
||||
gleam = "0.4.29"
|
||||
ipc-channel = "0.10"
|
||||
log = "0.3.5"
|
||||
num-traits = "0.1.32"
|
||||
|
|
|
@ -892,6 +892,9 @@ impl WebGLImpl {
|
|||
ctx.gl().delete_vertex_arrays(&[id.get()]),
|
||||
WebGLCommand::BindVertexArray(id) =>
|
||||
ctx.gl().bind_vertex_array(id.map_or(0, WebGLVertexArrayId::get)),
|
||||
WebGLCommand::AliasedPointSizeRange(sender) => {
|
||||
sender.send(ctx.gl().alias_point_size_range()).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: update test expectations in order to enable debug assertions
|
||||
|
|
|
@ -274,6 +274,7 @@ pub enum WebGLCommand {
|
|||
CreateVertexArray(WebGLSender<Option<WebGLVertexArrayId>>),
|
||||
DeleteVertexArray(WebGLVertexArrayId),
|
||||
BindVertexArray(Option<WebGLVertexArrayId>),
|
||||
AliasedPointSizeRange(WebGLSender<(f32, f32)>),
|
||||
}
|
||||
|
||||
macro_rules! define_resource_id_struct {
|
||||
|
@ -546,7 +547,8 @@ impl fmt::Debug for WebGLCommand {
|
|||
GenerateMipmap(..) => "GenerateMipmap",
|
||||
CreateVertexArray(..) => "CreateVertexArray",
|
||||
DeleteVertexArray(..) => "DeleteVertexArray",
|
||||
BindVertexArray(..) => "BindVertexArray"
|
||||
BindVertexArray(..) => "BindVertexArray",
|
||||
AliasedPointSizeRange(..) => "AliasedPointSizeRange",
|
||||
};
|
||||
|
||||
write!(f, "CanvasWebGLMsg::{}(..)", name)
|
||||
|
|
|
@ -13,7 +13,7 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
euclid = "0.17"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
gleam = "0.4"
|
||||
gleam = "0.4.29"
|
||||
image = "0.18"
|
||||
ipc-channel = "0.10"
|
||||
libc = "0.2"
|
||||
|
|
|
@ -45,7 +45,7 @@ domobject_derive = {path = "../domobject_derive"}
|
|||
encoding_rs = "0.7"
|
||||
euclid = "0.17"
|
||||
fnv = "1.0"
|
||||
gleam = "0.4"
|
||||
gleam = "0.4.29"
|
||||
half = "1.0"
|
||||
html5ever = "0.22"
|
||||
hyper = "0.10"
|
||||
|
|
|
@ -1328,6 +1328,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
[x, y, width, height].to_jsval(cx, rval.handle_mut());
|
||||
return rval.get();
|
||||
}
|
||||
constants::ALIASED_POINT_SIZE_RANGE => {
|
||||
let (sender, receiver) = webgl_channel().unwrap();
|
||||
self.send_command(WebGLCommand::AliasedPointSizeRange(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) {
|
||||
self.webgl_error(WebGLError::InvalidEnum);
|
||||
|
|
|
@ -40,7 +40,7 @@ devtools_traits = {path = "../devtools_traits"}
|
|||
env_logger = "0.4"
|
||||
euclid = "0.17"
|
||||
gfx = {path = "../gfx"}
|
||||
gleam = "0.4"
|
||||
gleam = "0.4.29"
|
||||
ipc-channel = "0.10"
|
||||
layout_thread = {path = "../layout_thread"}
|
||||
log = "0.3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue