Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp

Issue 13616008: Remove CG codepaths from SVG (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 context->setFillRule(svgStyle->fillRule()); 164 context->setFillRule(svgStyle->fillRule());
165 } else if (resourceMode & ApplyToStrokeMode) { 165 } else if (resourceMode & ApplyToStrokeMode) {
166 if (svgStyle->vectorEffect() == VE_NON_SCALING_STROKE) 166 if (svgStyle->vectorEffect() == VE_NON_SCALING_STROKE)
167 patternData->pattern->setPatternSpaceTransform(transformOnNonScaling Stroke(object, patternData->transform)); 167 patternData->pattern->setPatternSpaceTransform(transformOnNonScaling Stroke(object, patternData->transform));
168 context->setAlpha(svgStyle->strokeOpacity()); 168 context->setAlpha(svgStyle->strokeOpacity());
169 context->setStrokePattern(patternData->pattern); 169 context->setStrokePattern(patternData->pattern);
170 SVGRenderSupport::applyStrokeStyleToContext(context, style, object); 170 SVGRenderSupport::applyStrokeStyleToContext(context, style, object);
171 } 171 }
172 172
173 if (resourceMode & ApplyToTextMode) { 173 if (resourceMode & ApplyToTextMode) {
174 if (resourceMode & ApplyToFillMode) { 174 if (resourceMode & ApplyToFillMode)
175 context->setTextDrawingMode(TextModeFill); 175 context->setTextDrawingMode(TextModeFill);
176 176 else if (resourceMode & ApplyToStrokeMode)
177 #if USE(CG)
178 context->applyFillPattern();
179 #endif
180 } else if (resourceMode & ApplyToStrokeMode) {
181 context->setTextDrawingMode(TextModeStroke); 177 context->setTextDrawingMode(TextModeStroke);
182
183 #if USE(CG)
184 context->applyStrokePattern();
185 #endif
186 }
187 } 178 }
188 179
189 return true; 180 return true;
190 } 181 }
191 182
192 void RenderSVGResourcePattern::postApplyResource(RenderObject*, GraphicsContext* & context, unsigned short resourceMode, const Path* path, const RenderSVGShape* shape) 183 void RenderSVGResourcePattern::postApplyResource(RenderObject*, GraphicsContext* & context, unsigned short resourceMode, const Path* path, const RenderSVGShape* shape)
193 { 184 {
194 ASSERT(context); 185 ASSERT(context);
195 ASSERT(resourceMode != ApplyToDefaultMode); 186 ASSERT(resourceMode != ApplyToDefaultMode);
196 187
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return nullptr; 270 return nullptr;
280 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), node->r enderer(), contentTransformation); 271 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), node->r enderer(), contentTransformation);
281 } 272 }
282 273
283 return tileImage.release(); 274 return tileImage.release();
284 } 275 }
285 276
286 } 277 }
287 278
288 #endif 279 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698