mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
webgl: Refactor implementation to move logic inside the DOM interfaces
This improves the encapsulation and consistency in our WebGL implementation. Also allows to implement new methods such as `getShaderSource()`. It will also allow us to use `delete()` in the destructors of them (note that we will want to keep track of them from the context).
This commit is contained in:
parent
c022262826
commit
b1765c6882
11 changed files with 452 additions and 130 deletions
|
@ -28,11 +28,11 @@ impl WebGLUniformLocation {
|
|||
}
|
||||
|
||||
pub trait WebGLUniformLocationHelpers {
|
||||
fn get_id(self) -> i32;
|
||||
fn id(self) -> i32;
|
||||
}
|
||||
|
||||
impl<'a> WebGLUniformLocationHelpers for &'a WebGLUniformLocation {
|
||||
fn get_id(self) -> i32 {
|
||||
fn id(self) -> i32 {
|
||||
self.id
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue