Auto merge of #24386 - jdm:no-preserve-drawing-buffer, r=nox

webgl: Clear the drawing buffer when preserveDrawingBuffer is false.

This adds an explicit clear operation to a webgl canvas when the preserveDrawingBuffer attribute is false when creating the context. Because we're not using double buffering this may end up making some demos worse (ie. a clear operation at a random time while drawing a frame), but this problem is expected to go away when #24256 is fixed and we move to a multi-buffered frame setup. This change is important at this time because so many babylon.js demos rely on the engine clearing the frame, per the specification.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21132
- [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/24386)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-10-10 12:09:32 -04:00 committed by GitHub
commit ab8d99856e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 155 additions and 103 deletions

View file

@ -1,2 +0,0 @@
[context-creation.html]
expected: TIMEOUT