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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |