Chromium Code Reviews| Index: cc/debug/debug_colors.cc |
| diff --git a/cc/debug/debug_colors.cc b/cc/debug/debug_colors.cc |
| index 353bd7996e0a4fcdf4079726eaa1b6940c48953c..6573cacd5605d1bcc249ef0414b5a0dfe55abc56 100644 |
| --- a/cc/debug/debug_colors.cc |
| +++ b/cc/debug/debug_colors.cc |
| @@ -173,13 +173,17 @@ SkColor DebugColors::EvictedTileCheckerboardColor() { |
| // ======= Debug rect colors ======= |
| +static SkColor FadedGreen(unsigned initial_value, unsigned step) { |
| + unsigned value = step * initial_value / DebugColors::kFadeSteps; |
|
danakj
2014/03/06 19:03:21
DCHECK that step is in [0, kFadeSteps]?
|
| + return SkColorSetARGB(value, 0, 195, 0); |
| +} |
| // Paint rects in green. |
| -SkColor DebugColors::PaintRectBorderColor() { |
| - return SkColorSetARGB(255, 0, 195, 0); |
| +SkColor DebugColors::PaintRectBorderColor(unsigned step) { |
| + return FadedGreen(255, step); |
| } |
| int DebugColors::PaintRectBorderWidth() { return 2; } |
| -SkColor DebugColors::PaintRectFillColor() { |
| - return SkColorSetARGB(30, 0, 195, 0); |
| +SkColor DebugColors::PaintRectFillColor(unsigned step) { |
| + return FadedGreen(60, step); |
| } |
| // Property-changed rects in blue. |