Clear draw buffer after creation and resize.#75
Merged
emilio merged 1 commit intoservo:masterfrom Nov 30, 2016
Merged
Conversation
Member
|
I don't think we can call Otherwise we're changing the underlying state of the GL context under the hood, and I while I think What do you think? |
Contributor
Author
|
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). |
Member
|
Ok, r=me with that in Servo then. |
Contributor
Author
|
Ok, please bump version ;) |
Member
|
Done :P. Next time feel free to PR the version bump too. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.