diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-03-22 15:32:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 15:32:45 -0400 |
commit | c20d0c00d711cda61ad1b35f15f2fb563c042c5e (patch) | |
tree | d29d71631dc1301c6310234d9f1d4254b68054e1 /components/canvas/webgl_thread.rs | |
parent | 563f0ec8245d6ff4d7d200c30655f90f5bdfed64 (diff) | |
parent | c033b48def0d8d961fe76596597d3e98a528010a (diff) | |
download | servo-c20d0c00d711cda61ad1b35f15f2fb563c042c5e.tar.gz servo-c20d0c00d711cda61ad1b35f15f2fb563c042c5e.zip |
Auto merge of #20375 - servo:webgl, r=emilio
Fall down the WebGL rabbit hole and fix some bugs there
<!-- 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/20375)
<!-- Reviewable:end -->
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r-- | components/canvas/webgl_thread.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 785df7fd6c2..529d697d17e 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -860,8 +860,12 @@ impl WebGLImpl { ctx.gl().vertex_attrib_pointer_f32(attrib_id, size, normalized, stride, offset), WebGLCommand::VertexAttribPointer(attrib_id, size, data_type, normalized, stride, offset) => ctx.gl().vertex_attrib_pointer(attrib_id, size, data_type, normalized, stride, offset), - WebGLCommand::Viewport(x, y, width, height) => - ctx.gl().viewport(x, y, width, height), + WebGLCommand::GetViewport(sender) => { + sender.send(ctx.gl().get_viewport()).unwrap(); + } + WebGLCommand::SetViewport(x, y, width, height) => { + ctx.gl().viewport(x, y, width, height); + } WebGLCommand::TexImage2D(target, level, internal, width, height, format, data_type, data) => ctx.gl().tex_image_2d(target, level, internal, width, height, /*border*/0, format, data_type, Some(&data)), @@ -1055,8 +1059,7 @@ impl WebGLImpl { // Int32Array gl::MAX_VIEWPORT_DIMS | - gl::SCISSOR_BOX | - gl::VIEWPORT => Err(WebGLError::InvalidEnum), + gl::SCISSOR_BOX => Err(WebGLError::InvalidEnum), // Invalid parameters _ => Err(WebGLError::InvalidEnum) |