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..ca773b84b2b9f7f7814010deb4d463d8617c1fb9 100644 |
| --- a/cc/debug/debug_colors.cc |
| +++ b/cc/debug/debug_colors.cc |
| @@ -8,6 +8,13 @@ |
| namespace cc { |
| +static int paintRectColors[][3] = { |
| + {0, 95, 0}, |
| + {0, 175, 0}, |
| + {0, 255, 0} |
| +}; |
| +static int currentPaintRectColor = 2; |
|
caseq
2013/12/27 09:44:10
please use s_ on statics.
|
| + |
| 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); |
| + currentPaintRectColor = (currentPaintRectColor + 1) % 3; |
| + return SkColorSetARGB(255, |
| + paintRectColors[currentPaintRectColor][0], |
|
caseq
2013/12/27 09:44:10
Line continuation indent is 4 spaces.
|
| + paintRectColors[currentPaintRectColor][1], |
| + paintRectColors[currentPaintRectColor][2]); |
| } |
| int DebugColors::PaintRectBorderWidth() { return 2; } |
| SkColor DebugColors::PaintRectFillColor() { |
| - return SkColorSetARGB(30, 255, 0, 0); |
| + return SkColorSetARGB(30, |
| + paintRectColors[currentPaintRectColor][0], |
| + paintRectColors[currentPaintRectColor][1], |
| + paintRectColors[currentPaintRectColor][2]); |
| } |
| // Property-changed rects in blue. |