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 51c0ed28466063145376a0bef136e345daec4af0..cd98c8e94bd81feb5e1fcba2a72e4dc51b4b7572 100644 |
--- a/cc/layers/heads_up_display_layer_impl.cc |
+++ b/cc/layers/heads_up_display_layer_impl.cc |
@@ -684,6 +684,7 @@ void HeadsUpDisplayLayerImpl::DrawDebugRects( |
const std::vector<DebugRect>& debug_rects = debug_rect_history->debug_rects(); |
std::vector<DebugRect> new_paint_rects; |
+ std::vector<DebugRect> new_first_paint_rects; |
for (size_t i = 0; i < debug_rects.size(); ++i) { |
SkColor stroke_color = 0; |
@@ -695,6 +696,9 @@ void HeadsUpDisplayLayerImpl::DrawDebugRects( |
case PAINT_RECT_TYPE: |
new_paint_rects.push_back(debug_rects[i]); |
continue; |
+ case FIRST_PAINT_RECT_TYPE: |
+ new_first_paint_rects.push_back(debug_rects[i]); |
+ continue; |
case PROPERTY_CHANGED_RECT_TYPE: |
stroke_color = DebugColors::PropertyChangedRectBorderColor(); |
fill_color = DebugColors::PropertyChangedRectFillColor(); |
@@ -773,13 +777,35 @@ void HeadsUpDisplayLayerImpl::DrawDebugRects( |
if (fade_step_ > 0) { |
fade_step_--; |
for (size_t i = 0; i < paint_rects_.size(); ++i) { |
- DrawDebugRect(canvas, |
- &paint, |
- paint_rects_[i], |
- DebugColors::PaintRectBorderColor(fade_step_), |
- DebugColors::PaintRectFillColor(fade_step_), |
- DebugColors::PaintRectBorderWidth(), |
- ""); |
+ bool is_first_paint = paint_rects_[i].type == FIRST_PAINT_RECT_TYPE; |
+ DrawDebugRect( |
+ canvas, |
+ &paint, |
+ paint_rects_[i], |
+ DebugColors::PaintRectBorderColor(fade_step_, is_first_paint), |
+ DebugColors::PaintRectFillColor(fade_step_, is_first_paint), |
+ DebugColors::PaintRectBorderWidth(), |
+ ""); |
+ } |
+ } |
+ |
+ // TODO(kouhei) |
+ if (new_first_paint_rects.size()) { |
+ first_paint_rects_.swap(new_first_paint_rects); |
+ fade_step_f_ = DebugColors::kFadeSteps; |
+ } |
+ if (fade_step_f_ > 0) { |
+ fade_step_f_--; |
+ for (size_t i = 0; i < first_paint_rects_.size(); ++i) { |
+ bool is_first_paint = first_paint_rects_[i].type == FIRST_PAINT_RECT_TYPE; |
+ DrawDebugRect( |
+ canvas, |
+ &paint, |
+ first_paint_rects_[i], |
+ DebugColors::PaintRectBorderColor(fade_step_f_, is_first_paint), |
+ DebugColors::PaintRectFillColor(fade_step_f_, is_first_paint), |
+ DebugColors::PaintRectBorderWidth(), |
+ ""); |
} |
} |
} |