Skip to content
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

Merged
merged 1 commit into from Nov 8, 2017
Merged

Conversation

sotaroikeda
Copy link
Contributor

@sotaroikeda sotaroikeda commented Nov 7, 2017

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 Reviewable

src/gl_fns.rs Outdated
if len <= 0 {
return Vec::new();
}
let mut binary: Vec<u8> = Vec::new();
Copy link
Member

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> {
Copy link
Member

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> {
Copy link
Member

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

@sotaroikeda
Copy link
Contributor Author

Change has a wrong change, I am going to update it.

@sotaroikeda
Copy link
Contributor Author

@kvark, can you review the change again?

@kvark
Copy link
Member

kvark commented Nov 8, 2017

Thank you!
@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 2cecc19 has been approved by kvark

bors-servo pushed a commit that referenced this pull request Nov 8, 2017
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 -->
@bors-servo
Copy link
Contributor

⌛ Testing commit 2cecc19 with merge 0bc09fd...

@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis
Approved by: kvark
Pushing 0bc09fd to master...

@bors-servo bors-servo merged commit 2cecc19 into servo:master Nov 8, 2017
@sotaroikeda
Copy link
Contributor Author

Can we have this to be published as a new version on crates.io? Thanks!

@glennw
Copy link
Member

glennw commented Nov 8, 2017

@sotaroikeda Published 0.4.13 on crate.io.

@sotaroikeda
Copy link
Contributor Author

Thanks a lot!

@sotaroikeda sotaroikeda deleted the binary branch November 8, 2017 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants