Index: ui/views/background.cc |
diff --git a/ui/views/background.cc b/ui/views/background.cc |
index 74d2fdaf5732616b3e0fd352b509df111b2a952b..ba2ae219a742f07ca6ea9700cb6d2871b165c8a0 100644 |
--- a/ui/views/background.cc |
+++ b/ui/views/background.cc |
@@ -114,6 +114,19 @@ Background* Background::CreateVerticalGradientBackground(SkColor color1, |
} |
//static |
+Background* Background::CreateVerticalMultiColorGradientBackground( |
+ SkColor* colors, |
+ SkScalar* pos, |
+ size_t count) { |
+ Background* background = CreateBackgroundPainter( |
+ true, Painter::CreateVerticalMultiColorGradient(colors, pos, count)); |
+ background->SetNativeControlColor( |
+ color_utils::AlphaBlend(colors[0], colors[count-1], 128)); |
+ |
+ return background; |
+} |
+ |
+//static |
Background* Background::CreateBackgroundPainter(bool owns_painter, |
Painter* painter) { |
return new BackgroundPainter(owns_painter, painter); |