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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceLinearGradient.cpp

Issue 2957513002: Removed calls to RefPtr::Release in return statements with auto move. (Closed)
Patch Set: rebased Created 3 years, 5 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 *attributes.X2(), *attributes.Y2()); 52 *attributes.X2(), *attributes.Y2());
53 } 53 }
54 54
55 PassRefPtr<Gradient> LayoutSVGResourceLinearGradient::BuildGradient() const { 55 PassRefPtr<Gradient> LayoutSVGResourceLinearGradient::BuildGradient() const {
56 const LinearGradientAttributes& attributes = this->Attributes(); 56 const LinearGradientAttributes& attributes = this->Attributes();
57 RefPtr<Gradient> gradient = Gradient::CreateLinear( 57 RefPtr<Gradient> gradient = Gradient::CreateLinear(
58 StartPoint(attributes), EndPoint(attributes), 58 StartPoint(attributes), EndPoint(attributes),
59 PlatformSpreadMethodFromSVGType(attributes.SpreadMethod()), 59 PlatformSpreadMethodFromSVGType(attributes.SpreadMethod()),
60 Gradient::ColorInterpolation::kUnpremultiplied); 60 Gradient::ColorInterpolation::kUnpremultiplied);
61 gradient->AddColorStops(attributes.Stops()); 61 gradient->AddColorStops(attributes.Stops());
62 return gradient.Release(); 62 return gradient;
63 } 63 }
64 64
65 } // namespace blink 65 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698