Compare commits
5 Commits
wip/matthi
...
ebassi/iss
Author | SHA1 | Date | |
---|---|---|---|
|
6d3beaf955 | ||
|
1968a18edb | ||
|
cfe688f27e | ||
|
d37e9f708b | ||
|
fe66225189 |
@@ -848,7 +848,12 @@ gdk_wayland_device_pad_get_n_groups (GdkDevicePad *pad)
|
|||||||
|
|
||||||
data = gdk_wayland_seat_find_pad (GDK_WAYLAND_SEAT (seat),
|
data = gdk_wayland_seat_find_pad (GDK_WAYLAND_SEAT (seat),
|
||||||
GDK_DEVICE (pad));
|
GDK_DEVICE (pad));
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (data == NULL)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
g_assert (data != NULL);
|
g_assert (data != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
return g_list_length (data->mode_groups);
|
return g_list_length (data->mode_groups);
|
||||||
}
|
}
|
||||||
@@ -863,7 +868,12 @@ gdk_wayland_device_pad_get_group_n_modes (GdkDevicePad *pad,
|
|||||||
|
|
||||||
data = gdk_wayland_seat_find_pad (GDK_WAYLAND_SEAT (seat),
|
data = gdk_wayland_seat_find_pad (GDK_WAYLAND_SEAT (seat),
|
||||||
GDK_DEVICE (pad));
|
GDK_DEVICE (pad));
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (data == NULL)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
g_assert (data != NULL);
|
g_assert (data != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
group = g_list_nth_data (data->mode_groups, n_group);
|
group = g_list_nth_data (data->mode_groups, n_group);
|
||||||
if (!group)
|
if (!group)
|
||||||
@@ -909,7 +919,12 @@ gdk_wayland_device_pad_get_feature_group (GdkDevicePad *pad,
|
|||||||
|
|
||||||
data = gdk_wayland_seat_find_pad (GDK_WAYLAND_SEAT (seat),
|
data = gdk_wayland_seat_find_pad (GDK_WAYLAND_SEAT (seat),
|
||||||
GDK_DEVICE (pad));
|
GDK_DEVICE (pad));
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (data == NULL)
|
||||||
|
return -1;
|
||||||
|
#else
|
||||||
g_assert (data != NULL);
|
g_assert (data != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (l = data->mode_groups, i = 0; l; l = l->next, i++)
|
for (l = data->mode_groups, i = 0; l; l = l->next, i++)
|
||||||
{
|
{
|
||||||
@@ -4236,7 +4251,14 @@ tablet_pad_handle_button (void *data,
|
|||||||
wp_tablet_pad, button, state));
|
wp_tablet_pad, button, state));
|
||||||
|
|
||||||
group = tablet_pad_lookup_button_group (pad, button);
|
group = tablet_pad_lookup_button_group (pad, button);
|
||||||
|
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (group == NULL)
|
||||||
|
return;
|
||||||
|
#else
|
||||||
g_assert (group != NULL);
|
g_assert (group != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
n_group = g_list_index (pad->mode_groups, group);
|
n_group = g_list_index (pad->mode_groups, group);
|
||||||
|
|
||||||
event = gdk_pad_event_new_button (state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED
|
event = gdk_pad_event_new_button (state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED
|
||||||
|
@@ -58,6 +58,19 @@
|
|||||||
|
|
||||||
#include "gdk/gdk-private.h"
|
#include "gdk/gdk-private.h"
|
||||||
|
|
||||||
|
/* Keep g_assert() defined even if we disable it globally,
|
||||||
|
* as we use it in many places as a handy mechanism to check
|
||||||
|
* for non-NULL
|
||||||
|
*/
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
# undef g_assert
|
||||||
|
# define g_assert(expr) G_STMT_START { \
|
||||||
|
if G_LIKELY (expr) ; else \
|
||||||
|
g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||||
|
#expr); \
|
||||||
|
} G_STMT_END
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GdkWaylandDisplay:
|
* GdkWaylandDisplay:
|
||||||
*
|
*
|
||||||
|
@@ -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,8 +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);
|
||||||
|
|
||||||
@@ -730,7 +727,12 @@ gsk_gl_driver_mark_texture_permanent (GskGLDriver *self,
|
|||||||
{
|
{
|
||||||
Texture *t = gsk_gl_driver_get_texture (self, texture_id);
|
Texture *t = gsk_gl_driver_get_texture (self, texture_id);
|
||||||
|
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (t == NULL)
|
||||||
|
return;
|
||||||
|
#else
|
||||||
g_assert (t != NULL);
|
g_assert (t != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
t->permanent = TRUE;
|
t->permanent = TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -2002,7 +2002,12 @@ render_unblurred_inset_shadow_node (GskGLRenderer *self,
|
|||||||
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);
|
||||||
|
|
||||||
|
#if G_DISABLE_ASSERT
|
||||||
|
if (blur_radius == 0)
|
||||||
|
return;
|
||||||
|
#else
|
||||||
g_assert (blur_radius == 0);
|
g_assert (blur_radius == 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
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)),
|
||||||
|
@@ -19,9 +19,9 @@ rounded_rect_equal (const GskRoundedRect *r1,
|
|||||||
const GskRoundedRect *r2)
|
const GskRoundedRect *r2)
|
||||||
{
|
{
|
||||||
if (r1 == r2)
|
if (r1 == r2)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!r1)
|
if (r1 == NULL || r2 == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (r1->bounds.origin.x != r2->bounds.origin.x ||
|
if (r1->bounds.origin.x != r2->bounds.origin.x ||
|
||||||
@@ -626,6 +626,9 @@ ops_draw (RenderOpBuilder *builder,
|
|||||||
ProgramState *program_state = get_current_program_state (builder);
|
ProgramState *program_state = get_current_program_state (builder);
|
||||||
OpDraw *op;
|
OpDraw *op;
|
||||||
|
|
||||||
|
if (program_state == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (memcmp (&builder->current_projection, &program_state->projection, sizeof (graphene_matrix_t)) != 0)
|
if (memcmp (&builder->current_projection, &program_state->projection, sizeof (graphene_matrix_t)) != 0)
|
||||||
{
|
{
|
||||||
OpMatrix *opm;
|
OpMatrix *opm;
|
||||||
@@ -739,7 +742,12 @@ ops_set_inset_shadow (RenderOpBuilder *self,
|
|||||||
ProgramState *current_program_state = get_current_program_state (self);
|
ProgramState *current_program_state = get_current_program_state (self);
|
||||||
OpShadow *op;
|
OpShadow *op;
|
||||||
|
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (current_program_state == NULL)
|
||||||
|
return;
|
||||||
|
#else
|
||||||
g_assert (current_program_state);
|
g_assert (current_program_state);
|
||||||
|
#endif
|
||||||
|
|
||||||
op = ops_begin (self, OP_CHANGE_INSET_SHADOW);
|
op = ops_begin (self, OP_CHANGE_INSET_SHADOW);
|
||||||
|
|
||||||
@@ -806,7 +814,12 @@ ops_set_unblurred_outset_shadow (RenderOpBuilder *self,
|
|||||||
ProgramState *current_program_state = get_current_program_state (self);
|
ProgramState *current_program_state = get_current_program_state (self);
|
||||||
OpShadow *op;
|
OpShadow *op;
|
||||||
|
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (current_program_state == NULL)
|
||||||
|
return;
|
||||||
|
#else
|
||||||
g_assert (current_program_state);
|
g_assert (current_program_state);
|
||||||
|
#endif
|
||||||
|
|
||||||
op = ops_begin (self, OP_CHANGE_UNBLURRED_OUTSET_SHADOW);
|
op = ops_begin (self, OP_CHANGE_UNBLURRED_OUTSET_SHADOW);
|
||||||
|
|
||||||
@@ -869,7 +882,12 @@ ops_set_linear_gradient (RenderOpBuilder *self,
|
|||||||
OpLinearGradient *op;
|
OpLinearGradient *op;
|
||||||
const guint real_n_color_stops = MIN (GL_MAX_GRADIENT_STOPS, n_color_stops);
|
const guint real_n_color_stops = MIN (GL_MAX_GRADIENT_STOPS, n_color_stops);
|
||||||
|
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
if (current_program_state == NULL)
|
||||||
|
return;
|
||||||
|
#else
|
||||||
g_assert (current_program_state);
|
g_assert (current_program_state);
|
||||||
|
#endif
|
||||||
|
|
||||||
op = ops_begin (self, OP_CHANGE_LINEAR_GRADIENT);
|
op = ops_begin (self, OP_CHANGE_LINEAR_GRADIENT);
|
||||||
|
|
||||||
|
@@ -246,7 +246,7 @@ gsk_ngl_texture_atlas_initialize (GskNglDriver *driver,
|
|||||||
{
|
{
|
||||||
/* Insert a single pixel at 0,0 for use in coloring */
|
/* Insert a single pixel at 0,0 for use in coloring */
|
||||||
|
|
||||||
gboolean packed;
|
gboolean packed G_GNUC_UNUSED;
|
||||||
int x, y;
|
int x, y;
|
||||||
guint gl_format;
|
guint gl_format;
|
||||||
guint gl_type;
|
guint gl_type;
|
||||||
|
@@ -17,6 +17,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* We need to remove G_DISABLE_ASSERT to ensure g_test_init() works;
|
||||||
|
* this needs to happen before we end up including glib.h, so we should
|
||||||
|
* do it as soon as possible.
|
||||||
|
*/
|
||||||
|
#ifdef G_DISABLE_ASSERT
|
||||||
|
#undef G_DISABLE_ASSERT
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "gtkspinbutton.h"
|
#include "gtkspinbutton.h"
|
||||||
|
@@ -66,7 +66,7 @@ if debug
|
|||||||
gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
|
gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
|
||||||
endif
|
endif
|
||||||
elif optimization in ['2', '3', 's']
|
elif optimization in ['2', '3', 's']
|
||||||
gtk_debug_cflags += '-DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT'
|
gtk_debug_cflags += ['-DG_DISABLE_CAST_CHECKS', '-DG_DISABLE_ASSERT']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
add_project_arguments(gtk_debug_cflags, language: 'c')
|
add_project_arguments(gtk_debug_cflags, language: 'c')
|
||||||
|
Reference in New Issue
Block a user