Inline some methods in qgrayraster.
authorRobin Burchell <robin.burchell@collabora.com>
Sat, 17 Dec 2011 22:33:51 +0000 (23:33 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Jan 2012 11:53:34 +0000 (12:53 +0100)
gray_conic_to, gray_cubic_to and gray_line_to were all single line wrappers
around their equivilent gray_render counterparts, with an additional lie of
error handling that never actually happened.

Since this doesn't really do anything except confuse the reader, let's ... not
do it :)

Change-Id: Id5d86c49174acb92514b628a70bd32d6c6640a5d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/painting/qgrayraster.c

index 5334f97..837bf02 100644 (file)
     return 0;
   }
 
-
-  static int
-  gray_line_to( const QT_FT_Vector*  to,
-                PWorker           worker )
-  {
-    gray_render_line( worker, UPSCALE( to->x ), UPSCALE( to->y ) );
-    return 0;
-  }
-
-
-  static int
-  gray_conic_to( const QT_FT_Vector*  control,
-                 const QT_FT_Vector*  to,
-                 PWorker           worker )
-  {
-    gray_render_conic( worker, control, to );
-    return 0;
-  }
-
-
-  static int
-  gray_cubic_to( const QT_FT_Vector*  control1,
-                 const QT_FT_Vector*  control2,
-                 const QT_FT_Vector*  to,
-                 PWorker           worker )
-  {
-    gray_render_cubic( worker, control1, control2, to );
-    return 0;
-  }
-
-
   static void
   gray_render_span( int             count,
                     const QT_FT_Span*  spans,
             vec.x = SCALED( point->x );
             vec.y = SCALED( point->y );
 
-            error = gray_line_to( &vec, user );
-            if ( error )
-              goto Exit;
+            gray_render_line(user, UPSCALE(vec.x), UPSCALE(vec.y));
             continue;
           }
 
 
               if ( tag == QT_FT_CURVE_TAG_ON )
               {
-                error = gray_conic_to( &v_control, &vec,
-                                                  user );
-                if ( error )
-                  goto Exit;
+                gray_render_conic(user, &v_control, &vec);
                 continue;
               }
 
               v_middle.x = ( v_control.x + vec.x ) / 2;
               v_middle.y = ( v_control.y + vec.y ) / 2;
 
-              error = gray_conic_to( &v_control, &v_middle,
-                                                user );
-              if ( error )
-                goto Exit;
-
+              gray_render_conic(user, &v_control, &v_middle);
               v_control = vec;
               goto Do_Conic;
             }
 
-            error = gray_conic_to( &v_control, &v_start,
-                                              user );
+            gray_render_conic(user, &v_control, &v_start);
             goto Close;
           }
 
               vec.x = SCALED( point->x );
               vec.y = SCALED( point->y );
 
-              error = gray_cubic_to( &vec1, &vec2, &vec, user );
-              if ( error )
-                goto Exit;
+              gray_render_cubic(user, &vec1, &vec2, &vec);
               continue;
             }
 
-            error = gray_cubic_to( &vec1, &vec2, &v_start, user );
+            gray_render_cubic(user, &vec1, &vec2, &v_start);
             goto Close;
           }
         }
       }
 
       /* close the contour with a line segment */
-      error = gray_line_to( &v_start, user );
+      gray_render_line(user, UPSCALE(v_start.x), UPSCALE(v_start.y));
 
    Close:
-      if ( error )
-        goto Exit;
-
       first = last + 1;
     }