Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceRadialGradient.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceRadialGradient.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceRadialGradient.cpp |
index c5f3add06ccf11d55c0b18d4ee0ffb57c1637825..65b122459caa2adfa157c3bc170a9a1e62b555a7 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceRadialGradient.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceRadialGradient.cpp |
@@ -61,17 +61,15 @@ float LayoutSVGResourceRadialGradient::focalRadius(const RadialGradientAttribute |
return SVGLengthContext::resolveLength(element(), attributes.gradientUnits(), *attributes.fr()); |
} |
-void LayoutSVGResourceRadialGradient::buildGradient(GradientData* gradientData) const |
+PassRefPtr<Gradient> LayoutSVGResourceRadialGradient::buildGradient() const |
{ |
const RadialGradientAttributes& attributes = this->attributes(); |
- gradientData->gradient = Gradient::create(this->focalPoint(attributes), |
- this->focalRadius(attributes), |
- this->centerPoint(attributes), |
- this->radius(attributes)); |
- |
- gradientData->gradient->setSpreadMethod(platformSpreadMethodFromSVGType(attributes.spreadMethod())); |
- |
- addStops(gradientData, attributes.stops()); |
+ RefPtr<Gradient> gradient = Gradient::create( |
+ focalPoint(attributes), focalRadius(attributes), |
+ centerPoint(attributes), radius(attributes)); |
+ gradient->setSpreadMethod(platformSpreadMethodFromSVGType(attributes.spreadMethod())); |
+ addStops(*gradient, attributes.stops()); |
+ return gradient.release(); |
} |
} // namespace blink |