Auto merge of #10443 - emilio:webgl-teximage2d-overload, r=jdm

webgl: Implement the pending texImage2D overload, and add more validation

This is a large-ish refactor of the Texture2D code, but it should be
easier to read and of course more correct.

I tried to annotate every error condition with a spec paragraph.

I made just a reftest to ensure this works as intended, since I expect #10373 to land pretty soon.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10443)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-22 11:25:29 -07:00
commit f1defb446e
15 changed files with 615 additions and 137 deletions

View file

@ -5816,6 +5816,18 @@
"url": "/_mozilla/mozilla/webgl/draw_arrays_simple.html"
}
],
"mozilla/webgl/tex_image_2d_abv.html": [
{
"path": "mozilla/webgl/tex_image_2d_abv.html",
"references": [
[
"/_mozilla/mozilla/webgl/tex_image_2d_abv_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/webgl/tex_image_2d_abv.html"
}
],
"mozilla/webgl/tex_image_2d_canvas.html": [
{
"path": "mozilla/webgl/tex_image_2d_canvas.html",
@ -12490,6 +12502,18 @@
"url": "/_mozilla/mozilla/webgl/draw_arrays_simple.html"
}
],
"mozilla/webgl/tex_image_2d_abv.html": [
{
"path": "mozilla/webgl/tex_image_2d_abv.html",
"references": [
[
"/_mozilla/mozilla/webgl/tex_image_2d_abv_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/webgl/tex_image_2d_abv.html"
}
],
"mozilla/webgl/tex_image_2d_canvas.html": [
{
"path": "mozilla/webgl/tex_image_2d_canvas.html",