[gtk/wip/baedert/gl-rework: 3/4] rendernodes: Use floats for everything



commit 6e10b2c374213220b2843b0d8e984626d6b27185
Author: Timm Bäder <mail baedert org>
Date:   Wed Dec 18 09:48:25 2019 +0100

    rendernodes: Use floats for everything

 gsk/gskrendernode.h     | 12 ++++++------
 gsk/gskrendernodeimpl.c | 18 +++++++++---------
 gtk/gtkcssimagelinear.c |  2 +-
 3 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h
index a416785b8c..ae69124c5e 100644
--- a/gsk/gskrendernode.h
+++ b/gsk/gskrendernode.h
@@ -210,11 +210,11 @@ GskTransform *          gsk_transform_node_get_transform        (GskRenderNode
 
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_opacity_node_new                    (GskRenderNode            *child,
-                                                                 double                    opacity);
+                                                                 float                     opacity);
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_opacity_node_get_child              (GskRenderNode            *node);
 GDK_AVAILABLE_IN_ALL
-double                  gsk_opacity_node_get_opacity            (GskRenderNode            *node);
+float                   gsk_opacity_node_get_opacity            (GskRenderNode            *node);
 
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_color_matrix_node_new               (GskRenderNode            *child,
@@ -280,13 +280,13 @@ GskBlendMode            gsk_blend_node_get_blend_mode           (GskRenderNode
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_cross_fade_node_new                 (GskRenderNode            *start,
                                                                  GskRenderNode            *end,
-                                                                 double                    progress);
+                                                                 float                     progress);
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_cross_fade_node_get_start_child     (GskRenderNode            *node);
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_cross_fade_node_get_end_child       (GskRenderNode            *node);
 GDK_AVAILABLE_IN_ALL
-double                  gsk_cross_fade_node_get_progress        (GskRenderNode            *node);
+float                   gsk_cross_fade_node_get_progress        (GskRenderNode            *node);
 
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_text_node_new                       (PangoFont                *font,
@@ -307,11 +307,11 @@ const graphene_point_t *gsk_text_node_get_offset                (GskRenderNode
 
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_blur_node_new                       (GskRenderNode            *child,
-                                                                 double                    radius);
+                                                                 float                     radius);
 GDK_AVAILABLE_IN_ALL
 GskRenderNode *         gsk_blur_node_get_child                 (GskRenderNode            *node);
 GDK_AVAILABLE_IN_ALL
-double                  gsk_blur_node_get_radius                (GskRenderNode            *node);
+float                   gsk_blur_node_get_radius                (GskRenderNode            *node);
 
 G_END_DECLS
 
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 8c7be01555..d0902845d5 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -2197,7 +2197,7 @@ struct _GskOpacityNode
   GskRenderNode render_node;
 
   GskRenderNode *child;
-  double opacity;
+  float opacity;
 };
 
 static void
@@ -2267,7 +2267,7 @@ static const GskRenderNodeClass GSK_OPACITY_NODE_CLASS = {
  */
 GskRenderNode *
 gsk_opacity_node_new (GskRenderNode *child,
-                      double         opacity)
+                      float          opacity)
 {
   GskOpacityNode *self;
 
@@ -2301,7 +2301,7 @@ gsk_opacity_node_get_child (GskRenderNode *node)
   return self->child;
 }
 
-double
+float
 gsk_opacity_node_get_opacity (GskRenderNode *node)
 {
   GskOpacityNode *self = (GskOpacityNode *) node;
@@ -3278,7 +3278,7 @@ struct _GskCrossFadeNode
 
   GskRenderNode *start;
   GskRenderNode *end;
-  double         progress;
+  float          progress;
 };
 
 static void
@@ -3352,7 +3352,7 @@ static const GskRenderNodeClass GSK_CROSS_FADE_NODE_CLASS = {
 GskRenderNode *
 gsk_cross_fade_node_new (GskRenderNode *start,
                          GskRenderNode *end,
-                         double         progress)
+                         float          progress)
 {
   GskCrossFadeNode *self;
 
@@ -3390,7 +3390,7 @@ gsk_cross_fade_node_get_end_child (GskRenderNode *node)
   return self->end;
 }
 
-double
+float
 gsk_cross_fade_node_get_progress (GskRenderNode *node)
 {
   GskCrossFadeNode *self = (GskCrossFadeNode *) node;
@@ -3634,7 +3634,7 @@ struct _GskBlurNode
   GskRenderNode render_node;
 
   GskRenderNode *child;
-  double radius;
+  float radius;
 };
 
 static void
@@ -3882,7 +3882,7 @@ static const GskRenderNodeClass GSK_BLUR_NODE_CLASS = {
  */
 GskRenderNode *
 gsk_blur_node_new (GskRenderNode *child,
-                   double         radius)
+                   float          radius)
 {
   GskBlurNode *self;
   float clip_radius = gsk_cairo_blur_compute_pixels (radius);
@@ -3911,7 +3911,7 @@ gsk_blur_node_get_child (GskRenderNode *node)
   return self->child;
 }
 
-double
+float
 gsk_blur_node_get_radius (GskRenderNode *node)
 {
   GskBlurNode *self = (GskBlurNode *) node;
diff --git a/gtk/gtkcssimagelinear.c b/gtk/gtkcssimagelinear.c
index a1d1bf4eba..3816514d17 100644
--- a/gtk/gtkcssimagelinear.c
+++ b/gtk/gtkcssimagelinear.c
@@ -126,7 +126,7 @@ gtk_css_image_linear_compute_start_point (double angle_in_degrees,
   *x = c / (slope - perpendicular);
   *y = perpendicular * *x + c;
 }
-                                         
+
 static void
 gtk_css_image_linear_snapshot (GtkCssImage        *image,
                                GtkSnapshot        *snapshot,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]