Log new padding and cell size on 'SizeInfo' update

This makes our logging of 'SizeInfo' changes more consistent
with the one we're using when creating a new 'Display'.
This commit is contained in:
Kirill Chibisov 2020-09-24 03:08:26 +03:00 committed by GitHub
parent 56d25d1ff8
commit 62c300c14c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -357,6 +357,8 @@ impl Display {
let (cell_width, cell_height) = compute_cell_size(config, &self.glyph_cache.font_metrics());
size_info.cell_width = cell_width;
size_info.cell_height = cell_height;
info!("Cell Size: {} x {}", cell_width, cell_height);
}
/// Clear glyph cache.
@ -433,6 +435,9 @@ impl Display {
let physical = PhysicalSize::new(self.size_info.width as u32, self.size_info.height as u32);
self.window.resize(physical);
self.renderer.resize(&self.size_info);
info!("Padding: {} x {}", self.size_info.padding_x, self.size_info.padding_y);
info!("Width: {}, Height: {}", self.size_info.width, self.size_info.height);
}
/// Draw the screen.

View File

@ -1219,8 +1219,6 @@ impl TextShaderProgram {
let offset_x = -1.;
let offset_y = 1.;
info!("Width: {}, Height: {}", width, height);
unsafe {
gl::Uniform4f(self.u_projection, offset_x, offset_y, scale_x, scale_y);
}