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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceLinearGradient.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) 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 17 matching lines...) Expand all
28 28
29 RenderSVGResourceLinearGradient::RenderSVGResourceLinearGradient(SVGLinearGradie ntElement* node) 29 RenderSVGResourceLinearGradient::RenderSVGResourceLinearGradient(SVGLinearGradie ntElement* node)
30 : RenderSVGResourceGradient(node) 30 : RenderSVGResourceGradient(node)
31 { 31 {
32 } 32 }
33 33
34 RenderSVGResourceLinearGradient::~RenderSVGResourceLinearGradient() 34 RenderSVGResourceLinearGradient::~RenderSVGResourceLinearGradient()
35 { 35 {
36 } 36 }
37 37
38 void RenderSVGResourceLinearGradient::trace(Visitor* visitor)
39 {
40 visitor->trace(m_attributes);
41 RenderSVGResourceGradient::trace(visitor);
42 }
43
38 bool RenderSVGResourceLinearGradient::collectGradientAttributes(SVGGradientEleme nt* gradientElement) 44 bool RenderSVGResourceLinearGradient::collectGradientAttributes(SVGGradientEleme nt* gradientElement)
39 { 45 {
40 m_attributes = LinearGradientAttributes(); 46 m_attributes = LinearGradientAttributes();
41 return toSVGLinearGradientElement(gradientElement)->collectGradientAttribute s(m_attributes); 47 return toSVGLinearGradientElement(gradientElement)->collectGradientAttribute s(m_attributes);
42 } 48 }
43 49
44 FloatPoint RenderSVGResourceLinearGradient::startPoint(const LinearGradientAttri butes& attributes) const 50 FloatPoint RenderSVGResourceLinearGradient::startPoint(const LinearGradientAttri butes& attributes) const
45 { 51 {
46 return SVGLengthContext::resolvePoint(element(), attributes.gradientUnits(), attributes.x1(), attributes.y1()); 52 return SVGLengthContext::resolvePoint(element(), attributes.gradientUnits(), attributes.x1(), attributes.y1());
47 } 53 }
48 54
49 FloatPoint RenderSVGResourceLinearGradient::endPoint(const LinearGradientAttribu tes& attributes) const 55 FloatPoint RenderSVGResourceLinearGradient::endPoint(const LinearGradientAttribu tes& attributes) const
50 { 56 {
51 return SVGLengthContext::resolvePoint(element(), attributes.gradientUnits(), attributes.x2(), attributes.y2()); 57 return SVGLengthContext::resolvePoint(element(), attributes.gradientUnits(), attributes.x2(), attributes.y2());
52 } 58 }
53 59
54 void RenderSVGResourceLinearGradient::buildGradient(GradientData* gradientData) const 60 void RenderSVGResourceLinearGradient::buildGradient(GradientData* gradientData) const
55 { 61 {
56 gradientData->gradient = Gradient::create(startPoint(m_attributes), endPoint (m_attributes)); 62 gradientData->gradient = Gradient::create(startPoint(m_attributes), endPoint (m_attributes));
57 gradientData->gradient->setSpreadMethod(platformSpreadMethodFromSVGType(m_at tributes.spreadMethod())); 63 gradientData->gradient->setSpreadMethod(platformSpreadMethodFromSVGType(m_at tributes.spreadMethod()));
58 addStops(gradientData, m_attributes.stops()); 64 addStops(gradientData, m_attributes.stops());
59 } 65 }
60 66
61 } 67 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceLinearGradient.h ('k') | Source/core/rendering/svg/RenderSVGResourcePattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698