Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(961)

Unified Diff: cc/debug/debug_colors.cc

Issue 121223002: DevTools: Change paint rectangles' colors in compositor to shades of green. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed 'mutable' modifier. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/debug/debug_colors.h ('k') | cc/layers/heads_up_display_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/debug_colors.cc
diff --git a/cc/debug/debug_colors.cc b/cc/debug/debug_colors.cc
index 4e3f32e317d71b87a7b0bd74200454a7a459556a..6c7b0555d23c85df4fe69b172f1922579674d51b 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.
« no previous file with comments | « cc/debug/debug_colors.h ('k') | cc/layers/heads_up_display_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698