Skip to content

Commit

Permalink
Auto merge of servo#544 - glennw:fix-warnings, r=KiChjang
Browse files Browse the repository at this point in the history
Fix a warning.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/544)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo authored Nov 9, 2016
2 parents ca59a51 + 0621d76 commit 757dc7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webrender/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1570,8 +1570,8 @@ impl Device {

assert!(data.len() as u32 == bpp * row_length * height);

if let Some(stride) = stride {
gl::pixel_store_i(gl::UNPACK_ROW_LENGTH, row_length as gl::GLint);
if let Some(..) = stride {
gl::pixel_store_i(gl::UNPACK_ROW_LENGTH, row_length as gl::GLint);
}

self.bind_texture(TextureSampler::Color, texture_id);
Expand All @@ -1584,8 +1584,8 @@ impl Device {
data);

// Reset row length to 0, otherwise the stride would apply to all texture uploads.
if let Some(stride) = stride {
gl::pixel_store_i(gl::UNPACK_ROW_LENGTH, 0 as gl::GLint);
if let Some(..) = stride {
gl::pixel_store_i(gl::UNPACK_ROW_LENGTH, 0 as gl::GLint);
}
}

Expand Down

0 comments on commit 757dc7f

Please sign in to comment.