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

Unified Diff: third_party/WebKit/Source/platform/graphics/Gradient.cpp

Issue 2749583002: Add Gradient::addColorStops method (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Gradient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/Gradient.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Gradient.cpp b/third_party/WebKit/Source/platform/graphics/Gradient.cpp
index 2ce4c4e14a3604826ae5f6601e5c36f4bf4e562e..e6d5452e85b0b6fa2ec187d3cb3cce459f065b2b 100644
--- a/third_party/WebKit/Source/platform/graphics/Gradient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Gradient.cpp
@@ -86,6 +86,11 @@ void Gradient::addColorStop(const Gradient::ColorStop& stop) {
m_cachedShader.reset();
}
+void Gradient::addColorStops(const Vector<Gradient::ColorStop>& stops) {
+ for (const auto& stop : stops)
+ addColorStop(stop);
+}
+
void Gradient::sortStopsIfNecessary() {
if (m_stopsSorted)
return;
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Gradient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698