Skip to content

Commit

Permalink
Use Size2D in TexImage2D and TexSubImage2D messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Nov 20, 2018
1 parent f1dd31f commit 2a5539c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
14 changes: 6 additions & 8 deletions components/canvas/webgl_thread.rs
Expand Up @@ -1046,8 +1046,7 @@ impl WebGLImpl {
target,
level,
internal_format,
width,
height,
size,
format,
data_type,
unpacking_alignment,
Expand All @@ -1059,8 +1058,8 @@ impl WebGLImpl {
target,
level as i32,
internal_format as i32,
width as i32,
height as i32,
size.width as i32,
size.height as i32,
0,
format,
data_type,
Expand All @@ -1072,8 +1071,7 @@ impl WebGLImpl {
level,
xoffset,
yoffset,
width,
height,
size,
format,
data_type,
unpacking_alignment,
Expand All @@ -1086,8 +1084,8 @@ impl WebGLImpl {
level as i32,
xoffset,
yoffset,
width as i32,
height as i32,
size.width as i32,
size.height as i32,
format,
data_type,
&receiver.recv().unwrap(),
Expand Down
6 changes: 2 additions & 4 deletions components/canvas_traits/webgl.rs
Expand Up @@ -276,8 +276,7 @@ pub enum WebGLCommand {
target: u32,
level: u32,
internal_format: u32,
width: u32,
height: u32,
size: Size2D<u32>,
format: u32,
data_type: u32,
unpacking_alignment: u32,
Expand All @@ -288,8 +287,7 @@ pub enum WebGLCommand {
level: u32,
xoffset: i32,
yoffset: i32,
width: u32,
height: u32,
size: Size2D<u32>,
format: u32,
data_type: u32,
unpacking_alignment: u32,
Expand Down
6 changes: 2 additions & 4 deletions components/script/dom/webglrenderingcontext.rs
Expand Up @@ -751,8 +751,7 @@ impl WebGLRenderingContext {
target: target.as_gl_constant(),
level,
internal_format,
width: pixels.size.width,
height: pixels.size.height,
size: pixels.size,
format,
data_type: self.extension_manager.effective_type(data_type),
unpacking_alignment,
Expand Down Expand Up @@ -835,8 +834,7 @@ impl WebGLRenderingContext {
level,
xoffset,
yoffset,
width: pixels.size.width,
height: pixels.size.height,
size: pixels.size,
format: format.as_gl_constant(),
data_type: self
.extension_manager
Expand Down

0 comments on commit 2a5539c

Please sign in to comment.