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

Unified Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 474783002: HUD: Show first paint invalidation in red (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update only when needed Created 6 years, 4 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
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 fcb2733aee90279959fff97e43148cba86413eb4..321c4306c2be2d50563bc6339a6c2c9ba0cdfef7 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -667,6 +667,7 @@ void HeadsUpDisplayLayerImpl::DrawDebugRects(
switch (debug_rects[i].type) {
case PAINT_RECT_TYPE:
+ case FIRST_PAINT_RECT_TYPE:
new_paint_rects.push_back(debug_rects[i]);
continue;
case PROPERTY_CHANGED_RECT_TYPE:
@@ -747,13 +748,15 @@ 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(),
+ "");
}
}
}

Powered by Google App Engine
This is Rietveld 408576698