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 WebRender integration to Servo. #9589
Conversation
|
Heads up! This PR modifies the following files:
|
|
Since this is such a large patch, if anyone can take a look at their areas and do partial reviews, that would be great! |
|
Awesome work! Reviewed everything (except the glsl files) and I couldn't spot anything that looked wrong or deserved a change... Not an expert in every part of the codebase this patch touches though. Left a few notes for myself and for the curious regarding the moved WebGL code. Review status: 0 of 76 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. components/canvas/webgl_paint_thread.rs, line 182 [r1] (raw file): components/canvas_traits/lib.rs, line 43 [r1] (raw file): Comments from the review on Reviewable.io |
|
Should I review parts of this or am I too close to being the author for that? |
|
I don't know if it's needed, but note that wptrunner supports switching the expected results of tests based on the render backend, so if we plan to run webrender in CI we should check in metadata updates and not disable tests. |
| { | ||
| vColorTexCoord = aColorTexCoordRectTop.xy; | ||
| vMaskTexCoord = aMaskTexCoordRectTop.xy; | ||
| gl_Position = uTransform * vec4(aPosition, 1.0); |
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.
The alignment is broken in this line
|
|
Builds on my machine, seems to work just fine There's a lot of strange indentation in the GSL files, not sure if that's on purpose or not. |
|
Fixed up the unit tests and the notes about the shaders. |
|
@jgraham Great! Are there any docs / examples on how I should set up the files to have different expectations? |
|
You can use |
| @@ -976,6 +985,7 @@ pub enum DisplayItem { | |||
| StackingContextClass(Arc<StackingContext>), | |||
| LayeredItemClass(Box<LayeredItem>), | |||
| NoopClass(Box<BaseDisplayItem>), | |||
| IframeClass(Box<IframeDisplayItem>), | |||
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.
It feels like NoopClass could simply be removed in favor of the new IframeClass. NoopClass exits just as a placeholder so that iframes can hold a place in the display list without drawing anything.
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.
@mrobinson Sounds good - is it fine to this as a follow up once this PR lands do you think?
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.
@glennw Yeah, I think it would be fine to do in a separate patch.
|
Review status: 0 of 77 files reviewed at latest revision, 7 unresolved discussions. components/gfx/font_cache_thread.rs, line 300 [r4] (raw file): let font_key = self.webrender_api.as_ref().map(|webrender_api| {
self.webrender_fonts.entry(template.identifier.clone()).or_insert_with(|| {
match (template.bytes_if_in_memory(), template.native_font()) {
(Some(bytes), _) => webrender_api.add_raw_font(bytes),
(None, Some(native_font)) => webrender_api.add_native_font(native_font),
(None, None) => webrender_api.add_raw_font(template.bytes().clone()),
}
})
});Comments from the review on Reviewable.io |
|
Reviewed 3 of 76 files at r1. components/compositing/compositor.rs, line 1422 [r4] (raw file): Comments from the review on Reviewable.io |
|
Reviewed 7 of 76 files at r1, 1 of 1 files at r2. tests/wpt/harness/wptrunner/browsers/servo.py, line 61 [r4] (raw file): Comments from the review on Reviewable.io |
|
Reviewed 4 of 76 files at r1. components/util/Cargo.toml, line 29 [r4] (raw file): components/util/lib.rs, line 49 [r4] (raw file): Comments from the review on Reviewable.io |
|
|
| fn initialize_png(width: usize, height: usize) -> (Vec<gl::GLuint>, Vec<gl::GLuint>) { | ||
| fn initialize_png(width: usize, height: usize) -> (Vec<gl::GLuint>, | ||
| Vec<gl::GLuint>, | ||
| Vec<gl::GLuint>) { |
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.
Could we change the return value of this to be a struct?
WebRender is an experimental GPU accelerated rendering backend for Servo. The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used). WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
|
Fixed the android build failure in WR, and updated the cargo.lock files. |
|
r=pcwalton |
|
@bors-servo r=pcwalton |
|
|
Add WebRender integration to Servo. WebRender is an experimental GPU accelerated rendering backend for Servo. The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used). WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter! <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9589) <!-- Reviewable:end -->
|
|
|
Looking really good! |
|
Those are the same tests that are being reported as unexpected passes in #9668. What's going on here? |
Add WebRender integration to Servo. WebRender is an experimental GPU accelerated rendering backend for Servo. The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used). WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter! <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9589) <!-- Reviewable:end -->
|
|
WebRender is an experimental GPU accelerated rendering backend for Servo.
The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).
WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!