From 4c3a179ef37fe59047a2d9a1a45995fba40dfc46 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Thu, 9 Feb 2012 16:41:49 +0900 Subject: [PATCH] Remove TIZEN_FIX_DASHED_LINE_STROKE flag. This patch causes segmentation fault sometimes. Change-Id: Ic664384b19a8f0fca7420f694afb9d3f4003a5db --- src/cairo-matrix.c | 13 ------------- src/cairo-path-stroke-boxes.c | 33 --------------------------------- src/cairo.h | 1 - src/cairoint.h | 6 ------ 4 files changed, 53 deletions(-) diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c index e5e5888..2521135 100644 --- a/src/cairo-matrix.c +++ b/src/cairo-matrix.c @@ -743,19 +743,6 @@ _cairo_matrix_has_unity_scale (const cairo_matrix_t *matrix) return TRUE; } -#ifdef TIZEN_FIX_DASHED_LINE_STROKE -/* Check whether matrix is uniform scale or not */ -cairo_bool_t -_cairo_matrix_has_uniform_scale (const cairo_matrix_t *matrix) -{ - if (matrix->xy == 0.0 && matrix->yx == 0.0) { - if (matrix->xx == matrix->yy) - return TRUE; - } - return FALSE; -} -#endif - /* By pixel exact here, we mean a matrix that is composed only of * 90 degree rotations, flips, and integer translations and produces a 1:1 * mapping between source and destination pixels. If we transform an image diff --git a/src/cairo-path-stroke-boxes.c b/src/cairo-path-stroke-boxes.c index cd09bb6..c840e92 100644 --- a/src/cairo-path-stroke-boxes.c +++ b/src/cairo-path-stroke-boxes.c @@ -122,39 +122,21 @@ _cairo_rectilinear_stroker_init (cairo_rectilinear_stroker_t *stroker, return FALSE; } -#ifdef TIZEN_FIX_DASHED_LINE_STROKE -/* Use uniform scale instead of unity scale */ - if (! _cairo_matrix_has_uniform_scale (ctm)) - return FALSE; -#else if (! _cairo_matrix_has_unity_scale (ctm)) return FALSE; -#endif stroker->stroke_style = stroke_style; stroker->ctm = ctm; stroker->antialias = antialias; stroker->half_line_width = -#ifdef TIZEN_FIX_DASHED_LINE_STROKE -/* Scale line width using ctm matrix's xx value */ - _cairo_fixed_from_double (stroke_style->line_width*ctm->xx / 2.0); -#else _cairo_fixed_from_double (stroke_style->line_width / 2.0); -#endif stroker->open_sub_path = FALSE; stroker->segments = stroker->segments_embedded; stroker->segments_size = ARRAY_LENGTH (stroker->segments_embedded); stroker->num_segments = 0; -#ifdef TIZEN_FIX_DASHED_LINE_STROKE -/* Scale stroke style's dash using ctm matrix's xx value */ - int i; - for(i =0;i < stroke_style->num_dashes;i++) - stroke_style->dash[i] *= ctm->xx; -#endif - _cairo_stroker_dash_init (&stroker->dash, stroke_style); stroker->has_bounds = FALSE; @@ -627,9 +609,6 @@ _cairo_path_fixed_stroke_rectilinear_to_boxes (const cairo_path_fixed_t *path, cairo_rectilinear_stroker_t rectilinear_stroker; cairo_int_status_t status; cairo_box_t box; -#ifdef TIZEN_FIX_DASHED_LINE_STROKE - int i; -#endif assert (_cairo_path_fixed_stroke_is_rectilinear (path)); @@ -715,22 +694,10 @@ _cairo_path_fixed_stroke_rectilinear_to_boxes (const cairo_path_fixed_t *path, goto BAIL; done: -#ifdef TIZEN_FIX_DASHED_LINE_STROKE -/* Restore stroke style's dash value */ - for(i =0;i < stroke_style->num_dashes;i++) - stroke_style->dash[i] /= ctm->xx; -#endif - _cairo_rectilinear_stroker_fini (&rectilinear_stroker); return CAIRO_STATUS_SUCCESS; BAIL: -#ifdef TIZEN_FIX_DASHED_LINE_STROKE -/* Restore stroke style's dash value */ - for(i =0;i < stroke_style->num_dashes;i++) - stroke_style->dash[i] /= ctm->xx; -#endif - _cairo_rectilinear_stroker_fini (&rectilinear_stroker); _cairo_boxes_clear (boxes); return status; diff --git a/src/cairo.h b/src/cairo.h index f453035..6f4ee91 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -2940,7 +2940,6 @@ cairo_debug_reset_static_data (void); #endif #ifdef TIZEN_ENABLE_FEATURE -#define TIZEN_FIX_DASHED_LINE_STROKE /* Dashed line is displayed as unbroken line for certain scaling factor */ #endif /* TIZEN_ENABLE_FEATURE */ CAIRO_END_DECLS diff --git a/src/cairoint.h b/src/cairoint.h index 4b784a4..7121d09 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -1652,12 +1652,6 @@ _cairo_matrix_is_integer_translation(const cairo_matrix_t *matrix, cairo_private cairo_bool_t _cairo_matrix_has_unity_scale (const cairo_matrix_t *matrix); -#ifdef TIZEN_FIX_DASHED_LINE_STROKE -/* Check whether matrix is uniform scale or not */ -cairo_private cairo_bool_t -_cairo_matrix_has_uniform_scale (const cairo_matrix_t *matrix); -#endif - cairo_private cairo_bool_t _cairo_matrix_is_pixel_exact (const cairo_matrix_t *matrix) cairo_pure; -- 2.7.4