diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2020-02-24 08:07:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 08:07:17 -0500 |
commit | 6aacc9001be072c90bd7e1e554cfda982772cd12 (patch) | |
tree | ab0d369ab67f57a462cb728186ca797646ba825e /components/canvas/webgl_thread.rs | |
parent | 92f5b36f49671756e02a33ec70006d5b374a4388 (diff) | |
parent | 8701d4571517ddbddbb0aa5dffb2e485e9876938 (diff) | |
download | servo-6aacc9001be072c90bd7e1e554cfda982772cd12.tar.gz servo-6aacc9001be072c90bd7e1e554cfda982772cd12.zip |
Auto merge of #25789 - szeged:mmatyas__webgl_fns_clearbuffer, r=jdm
Add support for WebGL2 clear buffer operations
Adds support for the following WebGL2 methods:
- `clearBufferfv`
- `clearBufferiv`
- `clearBufferuiv`
- `clearBufferfi`
See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.11
<!-- Please describe your changes on the following line: -->
cc @jdm @zakorgy
Note: While the code itself doesn't depend on any other PRs, some of the tests do require WebGL2 framebuffer/renderbuffer support (#25785).
---
<!-- 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
- [x] There are tests for these changes
<!-- 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. -->
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r-- | components/canvas/webgl_thread.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 186ac043b38..079928c9d57 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -1956,6 +1956,18 @@ impl WebGLImpl { offset as isize, size as isize, ), + WebGLCommand::ClearBufferfv(buffer, draw_buffer, ref value) => { + gl.clear_buffer_fv(buffer, draw_buffer, value) + }, + WebGLCommand::ClearBufferiv(buffer, draw_buffer, ref value) => { + gl.clear_buffer_iv(buffer, draw_buffer, value) + }, + WebGLCommand::ClearBufferuiv(buffer, draw_buffer, ref value) => { + gl.clear_buffer_uiv(buffer, draw_buffer, value) + }, + WebGLCommand::ClearBufferfi(buffer, draw_buffer, depth, stencil) => { + gl.clear_buffer_fi(buffer, draw_buffer, depth, stencil) + }, } // If debug asertions are enabled, then check the error state. |