diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-25 15:16:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-25 15:16:48 -0500 |
commit | 80680764562bd4a46bd72a426b8157d59f6a6fd0 (patch) | |
tree | 8c0a11586e962c01960639d4c4cb56a61c063c78 /components/script/dom/mod.rs | |
parent | 6a09c36f8181fb359303c33d6fa1f1159e18255a (diff) | |
parent | 46c14aced2f761c39f0f602962c660e362d98416 (diff) | |
download | servo-80680764562bd4a46bd72a426b8157d59f6a6fd0.tar.gz servo-80680764562bd4a46bd72a426b8157d59f6a6fd0.zip |
Auto merge of #11724 - emilio:webgl-refactor, r=jdm
webgl: Refactor texture validations to take advantage of rust type system
<!-- Please describe your changes on the following line: -->
---
<!-- 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
<!-- Either: -->
- [x] These changes do not require tests because refactoring.
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit introduces the `WebGLValidator` trait, and uses it for multiple
validations in the texture-related WebGL code, to move that logic out of the
already bloated `webglrenderingcontext.rs` file.
It also creates a type-safe wrapper for some WebGL types, removing all the
`unreachable!`s there, and introduces a macro for generating them conveniently.
This partially addresses #10693, pending refactor more code to use this
infrastructure, and (possibly?) introducing an `AsGLError` trait for the errors
to make the error handling happen in `WebGLContext`.
r? @jdm
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11724)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/mod.rs')
-rw-r--r-- | components/script/dom/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index ff1a4638998..d76721ed040 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -394,6 +394,7 @@ pub mod validation; pub mod validitystate; pub mod values; pub mod virtualmethods; +pub mod webgl_validations; pub mod webglactiveinfo; pub mod webglbuffer; pub mod webglcontextevent; |