summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@collabora.com>2011-12-17 23:33:51 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-02 12:53:34 +0100
commit8cb0ef0793c292d546acabc813d8af6a026dc7bf (patch)
treedda60399bb941035950f8d8eb41d73c2fc85cfb2
parent1323eebfbf1285dc349f1730f30c91d1c7214132 (diff)
Inline some methods in qgrayraster.
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>
-rw-r--r--src/gui/painting/qgrayraster.c60
1 files changed, 7 insertions, 53 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 5334f97782..837bf0292a 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -1090,37 +1090,6 @@
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,
@@ -1464,9 +1433,7 @@
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;
}
@@ -1491,10 +1458,7 @@
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;
}
@@ -1504,17 +1468,12 @@
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;
}
@@ -1544,25 +1503,20 @@
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;
}