Chromium Code Reviews| Index: cc/debug/debug_colors.cc |
| diff --git a/cc/debug/debug_colors.cc b/cc/debug/debug_colors.cc |
| index 9fee7551b3d0d4a8dbb396aca22ce84561873d2e..74c06e1f83b3669ad743fed3d112c60793aa4fff 100644 |
| --- a/cc/debug/debug_colors.cc |
| +++ b/cc/debug/debug_colors.cc |
| @@ -8,6 +8,13 @@ |
| namespace cc { |
| +static int s_paintRectColors[][3] = { |
|
danakj
2014/01/06 20:38:28
these should actually be
const static int kPaintR
|
| + {0, 95, 0}, |
| + {0, 175, 0}, |
| + {0, 255, 0} |
| +}; |
| +static int s_currentPaintRectColor = 2; |
|
danakj
2014/01/06 20:38:28
s_current_paint_rect_color
|
| + |
| static float Scale(float width, const LayerTreeImpl* tree_impl) { |
| return width * (tree_impl ? tree_impl->device_scale_factor() : 1); |
| } |
| @@ -163,13 +170,20 @@ SkColor DebugColors::EvictedTileCheckerboardColor() { |
| // ======= Debug rect colors ======= |
| -// Paint rects in red. |
| +// Paint rects in shades of green. |
| SkColor DebugColors::PaintRectBorderColor() { |
| - return SkColorSetARGB(255, 255, 0, 0); |
| + s_currentPaintRectColor = (s_currentPaintRectColor + 1) % 3; |
|
danakj
2014/01/06 20:38:28
While this happens to work for now, it's a fragile
|
| + return SkColorSetARGB(255, |
| + s_paintRectColors[s_currentPaintRectColor][0], |
| + s_paintRectColors[s_currentPaintRectColor][1], |
| + s_paintRectColors[s_currentPaintRectColor][2]); |
| } |
| int DebugColors::PaintRectBorderWidth() { return 2; } |
| SkColor DebugColors::PaintRectFillColor() { |
| - return SkColorSetARGB(30, 255, 0, 0); |
| + return SkColorSetARGB(30, |
| + s_paintRectColors[s_currentPaintRectColor][0], |
| + s_paintRectColors[s_currentPaintRectColor][1], |
| + s_paintRectColors[s_currentPaintRectColor][2]); |
| } |
| // Property-changed rects in blue. |