Skip to content

Commit

Permalink
Revert extent size change
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Dusnoki committed Dec 4, 2018
1 parent 9b24bfb commit 4023a49
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions webrender/src/device/gfx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2172,16 +2172,19 @@ impl<B: hal::Backend> Device<B> {
},
);

let extent = caps.current_extent.unwrap_or(
let mut extent = caps.current_extent.unwrap_or(
hal::window::Extent2D {
width: window_size.0.max(caps.extents.start.width).min(caps.extents.end.width),
height: window_size.1.max(caps.extents.start.height).min(caps.extents.end.height),
}
);

if extent.width == 0 { extent.width = 1; }
if extent.height == 0 { extent.height = 1; }

let swap_config = SwapchainConfig::new(
if extent.width == 0 {1} else {extent.width},
if extent.height == 0 {1} else {extent.height},
extent.width,
extent.height,
surface_format,
caps.image_count.start
).with_image_usage(
Expand Down

0 comments on commit 4023a49

Please sign in to comment.