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

Replace use of gleam in webgl with sparkle. #24176

Merged
merged 1 commit into from Sep 12, 2019
Merged

Conversation

jdm
Copy link
Member

@jdm jdm commented Sep 10, 2019

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by #24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webgl_extensions/extensions.rs, components/script/Cargo.toml
  • @KiChjang: components/script/dom/webgl_extensions/extensions.rs, components/script/Cargo.toml

@highfive
Copy link

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 10, 2019
@jdm
Copy link
Member Author

jdm commented Sep 10, 2019

@bors-servo try

bors-servo pushed a commit that referenced this pull request Sep 10, 2019
Replace use of gleam in webgl with sparkle.

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by #24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/24176)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

⌛ Trying commit 0fb0c00 with merge c6b3829...

@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Sep 10, 2019
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Sep 10, 2019
@jdm
Copy link
Member Author

jdm commented Sep 10, 2019

@bors-servo try

@bors-servo
Copy link
Contributor

⌛ Trying commit 963c7c4 with merge 52877ef...

bors-servo pushed a commit that referenced this pull request Sep 10, 2019
Replace use of gleam in webgl with sparkle.

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by #24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/24176)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Sep 10, 2019
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Sep 10, 2019
@jdm
Copy link
Member Author

jdm commented Sep 10, 2019

@bors-servo try

@bors-servo
Copy link
Contributor

⌛ Trying commit eeb5d34 with merge 25ac322...

bors-servo pushed a commit that referenced this pull request Sep 10, 2019
Replace use of gleam in webgl with sparkle.

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by #24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/24176)
<!-- Reviewable:end -->
@jdm jdm added the S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. label Sep 10, 2019
Copy link
Member

@asajeffrey asajeffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far! You can r=me once the dependencies have merged.

let gl_type = match window.gl().get_type() {
gl::GlType::Gl => sparkle::gl::GlType::Gl,
gl::GlType::Gles => sparkle::gl::GlType::Gles,
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we re-export GlType to avoid this type conversion?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-export where? Have gleam depend on sparkle? Have sparkle depend on gleam? Neither solution sounds like an improvement to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, we're getting the GlType from glutin, oh that makes sense.

@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Sep 10, 2019
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Sep 10, 2019
@CYBAI
Copy link
Member

CYBAI commented Sep 12, 2019

@bors-servo
Copy link
Contributor

⌛ Testing commit 1cefae7 with merge ea24d14...

bors-servo pushed a commit that referenced this pull request Sep 12, 2019
Replace use of gleam in webgl with sparkle.

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by #24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/24176)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 12, 2019
@bors-servo
Copy link
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 12, 2019
@jdm
Copy link
Member Author

jdm commented Sep 12, 2019

@bors-servo retry

  • cygwin heap exhaustion

bors-servo pushed a commit that referenced this pull request Sep 12, 2019
Replace use of gleam in webgl with sparkle.

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by #24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/24176)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

⌛ Testing commit 1cefae7 with merge 897d030...

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 12, 2019
@bors-servo
Copy link
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 12, 2019
@jdm
Copy link
Member Author

jdm commented Sep 12, 2019

@bors-servo retry
#23290

@bors-servo
Copy link
Contributor

💣 Failed to start rebuilding: Unknown error

@bors-servo
Copy link
Contributor

⌛ Testing commit 1cefae7 with merge 89d0b02...

bors-servo pushed a commit that referenced this pull request Sep 12, 2019
Replace use of gleam in webgl with sparkle.

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by #24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/24176)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 12, 2019
@bors-servo
Copy link
Contributor

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: asajeffrey
Pushing 89d0b02 to master...

@bors-servo bors-servo merged commit 1cefae7 into servo:master Sep 12, 2019
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 12, 2019
@kvark
Copy link
Member

kvark commented Sep 18, 2019

Trying to understand the reasoning here. Is sparkle essentially a fork of gleam that will have more breaking changes? why couldn't you just manage it as a fork of gleam then?

@jdm
Copy link
Member Author

jdm commented Sep 18, 2019

Sparkle doesn't use traits, so changes to expose new methods don't cause semver major API changes. Additionally, sparkle only exposes methods for APIs thare are actually available for GL and GLES.

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

6 participants