| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 if (debug_state.continuous_painting) { | 272 if (debug_state.continuous_painting) { |
| 273 area = DrawPaintTimeDisplay( | 273 area = DrawPaintTimeDisplay( |
| 274 canvas, layer_tree_impl()->paint_time_counter(), 0, 0); | 274 canvas, layer_tree_impl()->paint_time_counter(), 0, 0); |
| 275 } else if (debug_state.show_fps_counter) { | 275 } else if (debug_state.show_fps_counter) { |
| 276 // Don't show the FPS display when continuous painting is enabled, because | 276 // Don't show the FPS display when continuous painting is enabled, because |
| 277 // it would show misleading numbers. | 277 // it would show misleading numbers. |
| 278 area = | 278 area = |
| 279 DrawFPSDisplay(canvas, layer_tree_impl()->frame_rate_counter(), 0, 0); | 279 DrawFPSDisplay(canvas, layer_tree_impl()->frame_rate_counter(), 0, 0); |
| 280 } | 280 } |
| 281 | 281 |
| 282 area = DrawGpuRasterizationStatus(canvas, 0, area.bottom(), | 282 if (debug_state.show_fps_counter || debug_state.continuous_painting) { |
| 283 SkMaxScalar(area.width(), 150)); | 283 area = DrawGpuRasterizationStatus(canvas, 0, area.bottom(), |
| 284 SkMaxScalar(area.width(), 150)); |
| 285 } |
| 284 | 286 |
| 285 if (debug_state.ShowMemoryStats()) | 287 if (debug_state.ShowMemoryStats()) |
| 286 DrawMemoryDisplay(canvas, 0, area.bottom(), SkMaxScalar(area.width(), 150)); | 288 DrawMemoryDisplay(canvas, 0, area.bottom(), SkMaxScalar(area.width(), 150)); |
| 287 } | 289 } |
| 288 | 290 |
| 289 void HeadsUpDisplayLayerImpl::DrawText(SkCanvas* canvas, | 291 void HeadsUpDisplayLayerImpl::DrawText(SkCanvas* canvas, |
| 290 SkPaint* paint, | 292 SkPaint* paint, |
| 291 const std::string& text, | 293 const std::string& text, |
| 292 SkPaint::Align align, | 294 SkPaint::Align align, |
| 293 int size, | 295 int size, |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 return "cc::HeadsUpDisplayLayerImpl"; | 838 return "cc::HeadsUpDisplayLayerImpl"; |
| 837 } | 839 } |
| 838 | 840 |
| 839 void HeadsUpDisplayLayerImpl::AsValueInto( | 841 void HeadsUpDisplayLayerImpl::AsValueInto( |
| 840 base::debug::TracedValue* dict) const { | 842 base::debug::TracedValue* dict) const { |
| 841 LayerImpl::AsValueInto(dict); | 843 LayerImpl::AsValueInto(dict); |
| 842 dict->SetString("layer_name", "Heads Up Display Layer"); | 844 dict->SetString("layer_name", "Heads Up Display Layer"); |
| 843 } | 845 } |
| 844 | 846 |
| 845 } // namespace cc | 847 } // namespace cc |
| OLD | NEW |