summaryrefslogtreecommitdiffstats
path: root/cc/debug
diff options
context:
space:
mode:
authormalch@chromium.org <malch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-13 16:27:18 +0000
committermalch@chromium.org <malch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-13 16:27:18 +0000
commitd432917bb2b32bf7c41a7deaac8996019a7a0b0b (patch)
treea0c6e4fddd4599c17a374eb00a16c0fe12691929 /cc/debug
parent143f58eba8debdd8f843fc4dfebb9b6bb7010b6a (diff)
downloadchromium_src-d432917bb2b32bf7c41a7deaac8996019a7a0b0b.zip
chromium_src-d432917bb2b32bf7c41a7deaac8996019a7a0b0b.tar.gz
chromium_src-d432917bb2b32bf7c41a7deaac8996019a7a0b0b.tar.bz2
Change paint rectangles' colors in compositor to shades of green.
Review URL: https://codereview.chromium.org/121223002 BUG=324535 Review URL: https://codereview.chromium.org/121223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug')
-rw-r--r--cc/debug/debug_colors.cc22
-rw-r--r--cc/debug/debug_colors.h4
2 files changed, 19 insertions, 7 deletions
diff --git a/cc/debug/debug_colors.cc b/cc/debug/debug_colors.cc
index 4e3f32e..6c7b055 100644
--- a/cc/debug/debug_colors.cc
+++ b/cc/debug/debug_colors.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/macros.h"
+
#include "cc/debug/debug_colors.h"
#include "cc/trees/layer_tree_impl.h"
@@ -171,13 +173,23 @@ SkColor DebugColors::EvictedTileCheckerboardColor() {
// ======= Debug rect colors =======
-// Paint rects in red.
-SkColor DebugColors::PaintRectBorderColor() {
- return SkColorSetARGB(255, 255, 0, 0);
+// Paint rects in shades of green.
+static const int kPaintRectColors[][3] = {{0, 155, 0}, {0, 195, 0},
+ {0, 235, 0}};
+SkColor DebugColors::PaintRectBorderColor(int color_index) {
+ int real_index = color_index % arraysize(kPaintRectColors);
+ return SkColorSetARGB(255,
+ kPaintRectColors[real_index][0],
+ kPaintRectColors[real_index][1],
+ kPaintRectColors[real_index][2]);
}
int DebugColors::PaintRectBorderWidth() { return 2; }
-SkColor DebugColors::PaintRectFillColor() {
- return SkColorSetARGB(30, 255, 0, 0);
+SkColor DebugColors::PaintRectFillColor(int color_index) {
+ int real_index = color_index % arraysize(kPaintRectColors);
+ return SkColorSetARGB(30,
+ kPaintRectColors[real_index][0],
+ kPaintRectColors[real_index][1],
+ kPaintRectColors[real_index][2]);
}
// Property-changed rects in blue.
diff --git a/cc/debug/debug_colors.h b/cc/debug/debug_colors.h
index 2c35c4a..062cedf 100644
--- a/cc/debug/debug_colors.h
+++ b/cc/debug/debug_colors.h
@@ -69,9 +69,9 @@ class DebugColors {
static SkColor EvictedTileCheckerboardColor();
static SkColor InvalidatedTileCheckerboardColor();
- static SkColor PaintRectBorderColor();
+ static SkColor PaintRectBorderColor(int color_index);
static int PaintRectBorderWidth();
- static SkColor PaintRectFillColor();
+ static SkColor PaintRectFillColor(int color_index);
static SkColor PropertyChangedRectBorderColor();
static int PropertyChangedRectBorderWidth();