From 91909a2c325bbbbfed1705203802b9f59aebe9cf Mon Sep 17 00:00:00 2001 From: Kyungjin Kim Date: Wed, 10 Apr 2013 14:05:46 +0900 Subject: [PATCH] remove duplicated variables in drawPatternToCairoContext [Title] remove duplicated variables in drawPatternToCairoContext [Issue#] N/A [Problem] The variable matrix is exactly same as patternMatrix but declared again [Cause] [Solution] fixed to share patternMatrix Change-Id: I11f8057ba7aae6602dd9db49b60dcf0101d24ff8 --- Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp index 57adcb3..8f211a7 100644 --- a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp +++ b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp @@ -345,9 +345,9 @@ void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSiz cairo_matrix_t ctm; cairo_get_matrix(cr, &ctm); - cairo_matrix_t matrix = cairo_matrix_t(patternTransform); + cairo_matrix_t patternMatrix = cairo_matrix_t(patternTransform); cairo_matrix_t totalMatrix; - cairo_matrix_multiply(&totalMatrix, &ctm, &matrix); + cairo_matrix_multiply(&totalMatrix, &ctm, &patternMatrix); double scaleX = ctm.xx ? ctm.xx : 1; double scaleY = ctm.yy ? ctm.yy : 1; @@ -388,7 +388,6 @@ void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSiz if (shouldScalePattern) cairo_matrix_init(&combined, 1 / scaleX, 0, 0, 1 / scaleY, phase.x() + tileRect.x() * patternTransform.a(), phase.y() + tileRect.y() * patternTransform.d()); else { - cairo_matrix_t patternMatrix = cairo_matrix_t(patternTransform); cairo_matrix_t phaseMatrix = {1, 0, 0, 1, phase.x() + tileRect.x() * patternTransform.a(), phase.y() + tileRect.y() * patternTransform.d()}; cairo_matrix_multiply(&combined, &patternMatrix, &phaseMatrix); } -- 2.7.4