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..c1edfbe35461c66d451c815aab066bee64ad740e 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(const int initial_value, const int step) { |
| + int value = step * initial_value / DebugColors::kFadeSteps; |
| + return SkColorSetARGB(value > 0 ? value : 0, 0, 195, 0); |
|
caseq
2014/03/06 10:46:32
Can value ever be negative?
malch
2014/03/06 11:27:57
Done.
|
| +} |
| // Paint rects in green. |
| -SkColor DebugColors::PaintRectBorderColor() { |
| - return SkColorSetARGB(255, 0, 195, 0); |
| +SkColor DebugColors::PaintRectBorderColor(const int step) { |
| + return FadedGreen(255, step); |
| } |
| int DebugColors::PaintRectBorderWidth() { return 2; } |
| -SkColor DebugColors::PaintRectFillColor() { |
| - return SkColorSetARGB(30, 0, 195, 0); |
| +SkColor DebugColors::PaintRectFillColor(const int step) { |
| + return FadedGreen(60, step); |
| } |
| // Property-changed rects in blue. |