gsk: Avoid compiler warnings without assertions

Disabling assertions was provoking some unused variable
warnings from the compiler. Avoid these.
This commit is contained in:
Matthias Clasen 2021-04-12 17:08:33 -04:00
parent 8c156e6b80
commit 9d3aa2cfce
2 changed files with 2 additions and 5 deletions

View File

@ -433,8 +433,6 @@ gsk_gl_driver_slice_texture (GskGLDriver *self,
guint *out_n_slices)
{
const int max_texture_size = gsk_gl_driver_get_max_texture_size (self) / 4; // XXX Too much?
const int tex_width = texture->width;
const int tex_height = texture->height;
const int cols = (texture->width / max_texture_size) + 1;
const int rows = (texture->height / max_texture_size) + 1;
int col, row;
@ -442,7 +440,7 @@ gsk_gl_driver_slice_texture (GskGLDriver *self,
TextureSlice *slices;
Texture *tex;
g_assert (tex_width > max_texture_size || tex_height > max_texture_size);
g_assert (texture->width > max_texture_size || texture->height > max_texture_size);
tex = gdk_texture_get_render_data (texture, self);

View File

@ -1997,12 +1997,11 @@ render_unblurred_inset_shadow_node (GskGLRenderer *self,
GskRenderNode *node,
RenderOpBuilder *builder)
{
const float blur_radius = gsk_inset_shadow_node_get_blur_radius (node);
const float dx = gsk_inset_shadow_node_get_dx (node);
const float dy = gsk_inset_shadow_node_get_dy (node);
const float spread = gsk_inset_shadow_node_get_spread (node);
g_assert (blur_radius == 0);
g_assert (gsk_inset_shadow_node_get_blur_radius (node) == 0);
ops_set_program (builder, &self->programs->inset_shadow_program);
ops_set_inset_shadow (builder, transform_rect (self, builder, gsk_inset_shadow_node_get_outline (node)),