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

Side by Side Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 689503002: cc: Use commit to activation time in repaint HUD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge + cl format Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « cc/debug/rendering_stats.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/layers/heads_up_display_layer_impl.h" 5 #include "cc/layers/heads_up_display_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 text_bounds2.bottom() + 2 * kPadding, 558 text_bounds2.bottom() + 2 * kPadding,
559 kGraphWidth, 559 kGraphWidth,
560 kGraphHeight); 560 kGraphHeight);
561 561
562 const std::string value_text = 562 const std::string value_text =
563 base::StringPrintf("%.1f", paint_time_graph_.value); 563 base::StringPrintf("%.1f", paint_time_graph_.value);
564 const std::string min_max_text = base::StringPrintf( 564 const std::string min_max_text = base::StringPrintf(
565 "%.1f-%.1f", paint_time_graph_.min, paint_time_graph_.max); 565 "%.1f-%.1f", paint_time_graph_.min, paint_time_graph_.max);
566 566
567 paint.setColor(DebugColors::PaintTimeDisplayTextAndGraphColor()); 567 paint.setColor(DebugColors::PaintTimeDisplayTextAndGraphColor());
568 DrawText(canvas, 568 DrawText(canvas, &paint, "Compositor frame time (ms)", SkPaint::kLeft_Align,
569 &paint, 569 kFontHeight, text_bounds.left(), text_bounds.bottom());
570 "Page paint time (ms)",
571 SkPaint::kLeft_Align,
572 kFontHeight,
573 text_bounds.left(),
574 text_bounds.bottom());
575 DrawText(canvas, 570 DrawText(canvas,
576 &paint, 571 &paint,
577 value_text, 572 value_text,
578 SkPaint::kLeft_Align, 573 SkPaint::kLeft_Align,
579 kFontHeight, 574 kFontHeight,
580 text_bounds2.left(), 575 text_bounds2.left(),
581 text_bounds2.bottom()); 576 text_bounds2.bottom());
582 DrawText(canvas, 577 DrawText(canvas,
583 &paint, 578 &paint,
584 min_max_text, 579 min_max_text,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 return "cc::HeadsUpDisplayLayerImpl"; 777 return "cc::HeadsUpDisplayLayerImpl";
783 } 778 }
784 779
785 void HeadsUpDisplayLayerImpl::AsValueInto( 780 void HeadsUpDisplayLayerImpl::AsValueInto(
786 base::debug::TracedValue* dict) const { 781 base::debug::TracedValue* dict) const {
787 LayerImpl::AsValueInto(dict); 782 LayerImpl::AsValueInto(dict);
788 dict->SetString("layer_name", "Heads Up Display Layer"); 783 dict->SetString("layer_name", "Heads Up Display Layer");
789 } 784 }
790 785
791 } // namespace cc 786 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698