Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMove WebGL validation #20369
Move WebGL validation #20369
Conversation
highfive
commented
Mar 20, 2018
|
Heads up! This PR modifies the following files:
|
highfive
commented
Mar 20, 2018
|
r? @emilio |
| gl::TEXTURE_WRAP_S | | ||
| gl::TEXTURE_WRAP_T => { | ||
| let parameter = gl.get_tex_parameter_iv(target, pname); | ||
| if parameter == 0 { |
This comment has been minimized.
This comment has been minimized.
gootorov
Mar 20, 2018
Author
Contributor
Note: I didn't find in the spec that it shouldn't be 0. Can we double check that?
This comment has been minimized.
This comment has been minimized.
emilio
Mar 20, 2018
Member
Can you file a separate issue for this? Let's keep this PR for the refactor I'd say, that makes it more straight-forward to land :)
This comment has been minimized.
This comment has been minimized.
|
Looks good, thanks! |
| gl::TEXTURE_WRAP_S | | ||
| gl::TEXTURE_WRAP_T => { | ||
| let parameter = gl.get_tex_parameter_iv(target, pname); | ||
| if parameter == 0 { |
This comment has been minimized.
This comment has been minimized.
emilio
Mar 20, 2018
Member
Can you file a separate issue for this? Let's keep this PR for the refactor I'd say, that makes it more straight-forward to land :)
| constants::HIGH_FLOAT | | ||
| constants::LOW_INT | | ||
| constants::MEDIUM_INT | | ||
| constants::HIGH_INT => true, |
This comment has been minimized.
This comment has been minimized.
emilio
Mar 20, 2018
Member
For a single validation that doesn't duplicate code, I'd remove the variable entirely and do:
match precision_type {
FOO | BAR | BAZ => {},
_ => {
self.webgl_error(InvalidEnum);
return None;
}
}wdyt?
This comment has been minimized.
This comment has been minimized.
gootorov
Mar 20, 2018
Author
Contributor
Yeah, I was thinking of that too. Let's do it this way then.
|
If you want to fix that nit please do, otherwise just say Thank you! @bors-servo delegate+ |
|
|
|
@bors-servo r=emilio |
|
|
Move WebGL validation This moves validation from `canvas/webgl_thread` to `dom/webglrenderingcontext` for consistency and speed and simplifies it where it is possible. --- <!-- 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 test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because: refactoring <!-- 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/20369) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
|
|
|
gootorov commentedMar 20, 2018
•
edited by SimonSapin
This moves validation from
canvas/webgl_threadtodom/webglrenderingcontextfor consistency and speed and simplifies it where it is possible../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is