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

Unified Diff: cc/layers/heads_up_display_layer_impl.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/layers/heads_up_display_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.cc
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index be5af99c71edea84b8c11f2c2d4f5cddf675d94d..e3c98dd5e304c9504a01c21070da4f5d6b33aa51 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -71,7 +71,8 @@ HeadsUpDisplayLayerImpl::HeadsUpDisplayLayerImpl(LayerTreeImpl* tree_impl,
typeface_(skia::AdoptRef(
SkTypeface::CreateFromName("monospace", SkTypeface::kBold))),
fps_graph_(60.0, 80.0),
- paint_time_graph_(16.0, 48.0) {}
+ paint_time_graph_(16.0, 48.0),
+ current_paint_rect_color_(0) {}
HeadsUpDisplayLayerImpl::~HeadsUpDisplayLayerImpl() {}
@@ -225,7 +226,7 @@ void HeadsUpDisplayLayerImpl::UpdateHudContents() {
paint_time_graph_.UpdateUpperBound();
}
-void HeadsUpDisplayLayerImpl::DrawHudContents(SkCanvas* canvas) const {
+void HeadsUpDisplayLayerImpl::DrawHudContents(SkCanvas* canvas) {
const LayerTreeDebugState& debug_state = layer_tree_impl()->debug_state();
if (debug_state.ShowHudRects())
@@ -588,9 +589,10 @@ SkRect HeadsUpDisplayLayerImpl::DrawPaintTimeDisplay(
void HeadsUpDisplayLayerImpl::DrawDebugRects(
SkCanvas* canvas,
- DebugRectHistory* debug_rect_history) const {
+ DebugRectHistory* debug_rect_history) {
const std::vector<DebugRect>& debug_rects = debug_rect_history->debug_rects();
SkPaint paint = CreatePaint();
+ current_paint_rect_color_++;
for (size_t i = 0; i < debug_rects.size(); ++i) {
SkColor stroke_color = 0;
@@ -600,8 +602,9 @@ void HeadsUpDisplayLayerImpl::DrawDebugRects(
switch (debug_rects[i].type) {
case PAINT_RECT_TYPE:
- stroke_color = DebugColors::PaintRectBorderColor();
- fill_color = DebugColors::PaintRectFillColor();
+ stroke_color =
+ DebugColors::PaintRectBorderColor(current_paint_rect_color_);
+ fill_color = DebugColors::PaintRectFillColor(current_paint_rect_color_);
stroke_width = DebugColors::PaintRectBorderWidth();
break;
case PROPERTY_CHANGED_RECT_TYPE:
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698