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

Clear draw buffer after creation and resize. #75

Merged
merged 1 commit into from Nov 30, 2016

Conversation

@MortimerGoro
Copy link
Collaborator

MortimerGoro commented Nov 30, 2016

I've been working on fixing the scissor test for servo/servo#14075 and found that the GLContexts are not cleared after creation. That's why that test is failing now (after fixing what the spec says about scissor).

I'm adding the clear changes here because I think that clearing the created framebuffer is a good default for any project. I had a lot of problems in the past with buggy Adreno GPUs on Android because of this. A initial clear is a safeguard to avoid problems. Some Adrenos were such bad that even required clearing the Depth/Stencil even if the buffer is neither created and used.

@emilio
Copy link
Member

emilio commented Nov 30, 2016

I don't think we can call ClearColor here, or at least we should restore the clear color on the WebGL implementation, right?

Otherwise we're changing the underlying state of the GL context under the hood, and I while I think Viewport and Scissor are probably fine to do on resize, ClearColor is more dubious to me.

What do you think?

@MortimerGoro
Copy link
Collaborator Author

MortimerGoro commented Nov 30, 2016

Yeah, that can be a problem in the resize method. It's not a problem in the init because a transparent color is the default one.

We can restore the ClearColor from WebGL (we are restoring scissor value too now to mach the Spec).

@emilio
Copy link
Member

emilio commented Nov 30, 2016

Ok, r=me with that in Servo then.

@emilio emilio closed this Nov 30, 2016
@emilio emilio reopened this Nov 30, 2016
@emilio emilio merged commit 59906a0 into servo:master Nov 30, 2016
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@MortimerGoro
Copy link
Collaborator Author

MortimerGoro commented Nov 30, 2016

Ok, please bump version ;)

@emilio
Copy link
Member

emilio commented Nov 30, 2016

Done :P.

Next time feel free to PR the version bump too.

@MortimerGoro MortimerGoro mentioned this pull request Nov 30, 2016
3 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.