Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/macros.h" | 5 #include "base/macros.h" |
| 6 | 6 |
| 7 #include "cc/debug/debug_colors.h" | 7 #include "cc/debug/debug_colors.h" |
| 8 | 8 |
| 9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 return SkColorSetRGB(128, 200, 245); | 166 return SkColorSetRGB(128, 200, 245); |
| 167 } | 167 } |
| 168 | 168 |
| 169 // Evicted tiles get pale red checkerboards. | 169 // Evicted tiles get pale red checkerboards. |
| 170 SkColor DebugColors::EvictedTileCheckerboardColor() { | 170 SkColor DebugColors::EvictedTileCheckerboardColor() { |
| 171 return SkColorSetRGB(255, 200, 200); | 171 return SkColorSetRGB(255, 200, 200); |
| 172 } | 172 } |
| 173 | 173 |
| 174 // ======= Debug rect colors ======= | 174 // ======= Debug rect colors ======= |
| 175 | 175 |
| 176 SkColor fadedGreen(const int initial_value, const int step) { | |
|
caseq
2014/03/05 13:20:59
static SkColor FadedGreen...
malch
2014/03/05 14:43:26
Done.
| |
| 177 int value = initial_value - (step * initial_value / DebugColors::kFadeSteps); | |
| 178 return SkColorSetARGB(value > 0 ? value : 0, 0, 195, 0); | |
|
caseq
2014/03/05 13:20:59
Can we rather fade them reducing alpha to 0?
malch
2014/03/05 14:43:26
Done.
| |
| 179 } | |
| 176 // Paint rects in green. | 180 // Paint rects in green. |
| 177 SkColor DebugColors::PaintRectBorderColor() { | 181 SkColor DebugColors::PaintRectBorderColor(const int step) { |
| 178 return SkColorSetARGB(255, 0, 195, 0); | 182 return fadedGreen(255, step); |
| 179 } | 183 } |
| 180 int DebugColors::PaintRectBorderWidth() { return 2; } | 184 int DebugColors::PaintRectBorderWidth() { return 2; } |
| 181 SkColor DebugColors::PaintRectFillColor() { | 185 SkColor DebugColors::PaintRectFillColor(const int step) { |
| 182 return SkColorSetARGB(30, 0, 195, 0); | 186 return fadedGreen(60, step); |
| 183 } | 187 } |
| 184 | 188 |
| 185 // Property-changed rects in blue. | 189 // Property-changed rects in blue. |
| 186 SkColor DebugColors::PropertyChangedRectBorderColor() { | 190 SkColor DebugColors::PropertyChangedRectBorderColor() { |
| 187 return SkColorSetARGB(255, 0, 0, 255); | 191 return SkColorSetARGB(255, 0, 0, 255); |
| 188 } | 192 } |
| 189 int DebugColors::PropertyChangedRectBorderWidth() { return 2; } | 193 int DebugColors::PropertyChangedRectBorderWidth() { return 2; } |
| 190 SkColor DebugColors::PropertyChangedRectFillColor() { | 194 SkColor DebugColors::PropertyChangedRectFillColor() { |
| 191 return SkColorSetARGB(30, 0, 0, 255); | 195 return SkColorSetARGB(30, 0, 0, 255); |
| 192 } | 196 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 SkColor DebugColors::MemoryDisplayTextColor() { | 304 SkColor DebugColors::MemoryDisplayTextColor() { |
| 301 return SkColorSetARGB(255, 220, 220, 220); | 305 return SkColorSetARGB(255, 220, 220, 220); |
| 302 } | 306 } |
| 303 | 307 |
| 304 // Paint time display in green (similar to paint times in the WebInspector) | 308 // Paint time display in green (similar to paint times in the WebInspector) |
| 305 SkColor DebugColors::PaintTimeDisplayTextAndGraphColor() { | 309 SkColor DebugColors::PaintTimeDisplayTextAndGraphColor() { |
| 306 return SkColorSetRGB(75, 155, 55); | 310 return SkColorSetRGB(75, 155, 55); |
| 307 } | 311 } |
| 308 | 312 |
| 309 } // namespace cc | 313 } // namespace cc |
| OLD | NEW |