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

Side by Side Diff: Source/core/rendering/svg/SVGPathData.cpp

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 path.addLineTo(FloatPoint(line->x2()->currentValue()->value(lengthContext), line->y2()->currentValue()->value(lengthContext))); 72 path.addLineTo(FloatPoint(line->x2()->currentValue()->value(lengthContext), line->y2()->currentValue()->value(lengthContext)));
73 } 73 }
74 74
75 static void updatePathFromPathElement(SVGElement* element, Path& path) 75 static void updatePathFromPathElement(SVGElement* element, Path& path)
76 { 76 {
77 buildPathFromByteStream(toSVGPathElement(element)->pathByteStream(), path); 77 buildPathFromByteStream(toSVGPathElement(element)->pathByteStream(), path);
78 } 78 }
79 79
80 static void updatePathFromPolylineElement(SVGElement* element, Path& path) 80 static void updatePathFromPolylineElement(SVGElement* element, Path& path)
81 { 81 {
82 RefPtr<SVGPointList> points = toSVGPolyElement(element)->points()->currentVa lue(); 82 RefPtrWillBeRawPtr<SVGPointList> points = toSVGPolyElement(element)->points( )->currentValue();
83 if (points->isEmpty()) 83 if (points->isEmpty())
84 return; 84 return;
85 85
86 SVGPointList::ConstIterator it = points->begin(); 86 SVGPointList::ConstIterator it = points->begin();
87 SVGPointList::ConstIterator itEnd = points->end(); 87 SVGPointList::ConstIterator itEnd = points->end();
88 ASSERT(it != itEnd); 88 ASSERT(it != itEnd);
89 path.moveTo(it->value()); 89 path.moveTo(it->value());
90 ++it; 90 ++it;
91 91
92 for (; it != itEnd; ++it) 92 for (; it != itEnd; ++it)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 map->set(polygonTag.localName().impl(), updatePathFromPolygonElement); 147 map->set(polygonTag.localName().impl(), updatePathFromPolygonElement);
148 map->set(polylineTag.localName().impl(), updatePathFromPolylineElement); 148 map->set(polylineTag.localName().impl(), updatePathFromPolylineElement);
149 map->set(rectTag.localName().impl(), updatePathFromRectElement); 149 map->set(rectTag.localName().impl(), updatePathFromRectElement);
150 } 150 }
151 151
152 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im pl())) 152 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im pl()))
153 (*pathUpdateFunction)(element, path); 153 (*pathUpdateFunction)(element, path);
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceRadialGradient.cpp ('k') | Source/core/rendering/svg/SVGRenderSupport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698