New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add program binary related functions #132
Conversation
src/gl_fns.rs
Outdated
if len <= 0 { | ||
return Vec::new(); | ||
} | ||
let mut binary: Vec<u8> = Vec::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could be Vec::with_capacity(len as _)
src/gl_fns.rs
Outdated
@@ -1149,6 +1149,53 @@ impl Gl for GlFns { | |||
} | |||
} | |||
|
|||
fn get_program_binary(&self, program: GLuint, format: &mut GLenum) -> Vec<u8> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format
should be part of the returned value, not input parameter
src/gles_fns.rs
Outdated
@@ -1121,6 +1121,41 @@ impl Gl for GlesFns { | |||
} | |||
} | |||
|
|||
fn get_program_binary(&self, program: GLuint, format: &mut GLenum) -> Vec<u8> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of scope here, but it's unfortunate that we duplicate as much code as we do between GL/GLES
Change has a wrong change, I am going to update it. |
@kvark, can you review the change again? |
Thank you! |
📌 Commit 2cecc19 has been approved by |
Add program binary related functions Add program binary related functions. They are going to be used to speed up webrender shaders initializations. This pull request is related to [Bug 1391159](https://bugzilla.mozilla.org/show_bug.cgi?id=1391159) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/gleam/132) <!-- Reviewable:end -->
☀️ Test successful - status-travis |
Can we have this to be published as a new version on crates.io? Thanks! |
@sotaroikeda Published 0.4.13 on crate.io. |
Thanks a lot! |
Add program binary related functions. They are going to be used to speed up webrender shaders initializations.
This pull request is related to Bug 1391159
This change is