Repository navigation
Isolate GL calls to the device only - #480
Conversation
glennw
left a comment
There was a problem hiding this comment.
Nice! Just a couple of minor issues / comments. I'll run the tests against this locally later today but it looks good.
| self.create_fbo_for_texture_if_necessary(temp_texture_id, None); | ||
|
|
||
| self.bind_render_target(Some((texture_id, 0))); | ||
| self.bind_render_target(Some((texture_id, 0, [1, 1]))); |
There was a problem hiding this comment.
This adds an extra glViewport call here. It should be fine, I think - but perhaps worth a comment just noting why it's ok to pass [1, 1] here.
| self.init_texture(texture_id, new_width, new_height, format, filter, mode, None); | ||
| self.create_fbo_for_texture_if_necessary(texture_id, None); | ||
| self.bind_render_target(Some((temp_texture_id, 0))); | ||
| self.bind_render_target(Some((temp_texture_id, 0, [1, 1]))); |
| profiler: Profiler::new(), | ||
| enable_profiler: options.enable_profiler, | ||
| enable_msaa: options.enable_msaa, | ||
| _enable_msaa: options.enable_msaa, |
There was a problem hiding this comment.
We could possibly just remove the MSAA related code altogether, since it's unused. But it's fine to leave here for now if you like, we could do that as a follow up.
There was a problem hiding this comment.
Ok, I removed some of the MSAA logic, but left the RenderOptions (to avoid breaking the API, who knows if we'll need it back soon?) as well as the device's capability field.
|
Should be ready now. |
|
@bors-servo r+ |
|
📌 Commit 262ef0e has been approved by |
Isolate GL calls to the device only Also used by the WebGL module, but cutting that tie off would be a much bigger task. This PR makes the code a bit cleaner, also paves the way to #407. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/480) <!-- Reviewable:end -->
|
☀️ Test successful - status-travis |
Fix GL stencil state This was a typo from #480 Found out by qApitrace log: > major api error 14: GL_INVALID_ENUM in glDisable(GL_STENCIL) Perhaps, we should check for gl errors in the code too. We seem to only do that for WebGL commands at this point. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/500) <!-- Reviewable:end -->
Also used by the WebGL module, but cutting that tie off would be a much bigger task.
This PR makes the code a bit cleaner, also paves the way to #407.
This change is