mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
gstreamer: Use G_APPROX_VALUE to compare floats
Mainly to silence compiler warnings.
This commit is contained in:
parent
4060c43ae7
commit
465446430e
@ -265,10 +265,13 @@ gtk_gst_paintable_set_paintable (GtkGstPaintable *self,
|
||||
return;
|
||||
|
||||
if (self->image == NULL ||
|
||||
self->pixel_aspect_ratio * gdk_paintable_get_intrinsic_width (self->image) !=
|
||||
pixel_aspect_ratio * gdk_paintable_get_intrinsic_width (paintable) ||
|
||||
gdk_paintable_get_intrinsic_height (self->image) != gdk_paintable_get_intrinsic_height (paintable) ||
|
||||
gdk_paintable_get_intrinsic_aspect_ratio (self->image) != gdk_paintable_get_intrinsic_aspect_ratio (paintable) ||
|
||||
!G_APPROX_VALUE (self->pixel_aspect_ratio * gdk_paintable_get_intrinsic_width (self->image),
|
||||
pixel_aspect_ratio * gdk_paintable_get_intrinsic_width (paintable),
|
||||
FLT_EPSILON) ||
|
||||
!G_APPROX_VALUE (gdk_paintable_get_intrinsic_aspect_ratio (self->image),
|
||||
gdk_paintable_get_intrinsic_aspect_ratio (paintable),
|
||||
FLT_EPSILON) ||
|
||||
!graphene_rect_equal (viewport, &self->viewport))
|
||||
size_changed = TRUE;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user