Auto merge of #20648 - mattnenterprise:aliased-line-width-range, r=nox

Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)

<!-- Please describe your changes on the following line: -->

Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20535

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/20648)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-04-18 02:05:35 -04:00 committed by GitHub
commit b182d7c2ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 24 deletions

View file

@ -45,7 +45,7 @@ domobject_derive = {path = "../domobject_derive"}
encoding_rs = "0.7"
euclid = "0.17"
fnv = "1.0"
gleam = "0.4.29"
gleam = "0.4.34"
half = "1.0"
html5ever = "0.22"
hyper = "0.10"

View file

@ -1326,6 +1326,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
[width, height].to_jsval(cx, rval.handle_mut());
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) {
self.webgl_error(WebGLError::InvalidEnum);