KhronosGroup / KhronosGroup/WebGL
Clean up texImage[23]D tests' image loading code
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.9k
- Forks
- 704
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
The JavaScript files:
sdk/tests/js/tests/tex-image-and-sub-image-2d-with-image.js
sdk/tests/js/tests/tex-image-and-sub-image-3d-with-image.js
use WebGLTestUtils.loadTexture to load their image resources, but the texture it allocates internally is dropped. They should use WebGLTestUtils.loadImageAsync instead.
There's a behavioral difference between the two, however -- one instantiates an <img> tag and one calls "new Image()". These should have the same effect -- at least, in this day and age -- so the behavior here should be unified.
It's too late in the WebGL 2.0.0 conformance process to make a change as deep as this, so this should be done after the 2.0.0 snapshot is taken.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with sdk/tests/js/tests/tex-image-and-sub-image-2d-with-image.js and sdk/tests/js/tests/tex-image-and-sub-image-3d-with-image.js, then compare WebGLTestUtils.loadTexture with WebGLTestUtils.loadImageAsync. Check how each creates the image element and unify that behavior while removing the dropped texture allocation. Done means both named tests use the appropriate image-loading path without changing their intended coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100