mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gsk: Avoid compiler warnings without assertions
Disabling assertions was provoking some unused variable warnings from the compiler. Avoid these.
This commit is contained in:
parent
8c156e6b80
commit
9d3aa2cfce
@ -433,8 +433,6 @@ gsk_gl_driver_slice_texture (GskGLDriver *self,
|
|||||||
guint *out_n_slices)
|
guint *out_n_slices)
|
||||||
{
|
{
|
||||||
const int max_texture_size = gsk_gl_driver_get_max_texture_size (self) / 4; // XXX Too much?
|
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 cols = (texture->width / max_texture_size) + 1;
|
||||||
const int rows = (texture->height / max_texture_size) + 1;
|
const int rows = (texture->height / max_texture_size) + 1;
|
||||||
int col, row;
|
int col, row;
|
||||||
@ -442,7 +440,7 @@ gsk_gl_driver_slice_texture (GskGLDriver *self,
|
|||||||
TextureSlice *slices;
|
TextureSlice *slices;
|
||||||
Texture *tex;
|
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);
|
tex = gdk_texture_get_render_data (texture, self);
|
||||||
|
@ -1997,12 +1997,11 @@ render_unblurred_inset_shadow_node (GskGLRenderer *self,
|
|||||||
GskRenderNode *node,
|
GskRenderNode *node,
|
||||||
RenderOpBuilder *builder)
|
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 dx = gsk_inset_shadow_node_get_dx (node);
|
||||||
const float dy = gsk_inset_shadow_node_get_dy (node);
|
const float dy = gsk_inset_shadow_node_get_dy (node);
|
||||||
const float spread = gsk_inset_shadow_node_get_spread (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_program (builder, &self->programs->inset_shadow_program);
|
||||||
ops_set_inset_shadow (builder, transform_rect (self, builder, gsk_inset_shadow_node_get_outline (node)),
|
ops_set_inset_shadow (builder, transform_rect (self, builder, gsk_inset_shadow_node_get_outline (node)),
|
||||||
|
Loading…
Reference in New Issue
Block a user