Fix immersive mode panic on three.js rollercoaster on hololens
We have some special logic about texture formats when creating drawing buffers for WebGL that needs to be shared with the code that creates a separate framebuffer for immersive mode.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#24083 and fix#20595.
- [x] These changes do not require tests because no CI for hololens; tested manually in the emulator.
<!-- 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/24242)
<!-- Reviewable:end -->
Implement raqote backend for canvas 2D rendering
<!-- Please describe your changes on the following line: -->
This is a follow-up of #23936.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix#23431
<!-- Either: -->
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/24048)
<!-- Reviewable:end -->
This patch fixes a crash caused by using a deprecated GL call.
Starting with OpenGL 3 (used by WebGL2), the `glGetString(GL_EXTENSIONS)`
call is deprecated, and some drivers produce GL_INVALID_ENUM error.
Querying can be done by checking the number of extensions first,
then getting the extensions one by one.
This makes some tests regarding clearing rects pass. Otherwise the rect
wouldn't get cleared properly and it'd keep its original color but get
an alpha of 0
I tried to mimic the azure implementation but raqote doesn't have a
concept of horizontal or vertical repeat so this might be
wrong/incomplete but this is the last function needed to finally have
some tests pass