| 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/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 DrawGraphLines(canvas, &paint, graph_bounds, paint_time_graph_); | 584 DrawGraphLines(canvas, &paint, graph_bounds, paint_time_graph_); |
| 585 | 585 |
| 586 return area; | 586 return area; |
| 587 } | 587 } |
| 588 | 588 |
| 589 void HeadsUpDisplayLayerImpl::DrawDebugRects( | 589 void HeadsUpDisplayLayerImpl::DrawDebugRects( |
| 590 SkCanvas* canvas, | 590 SkCanvas* canvas, |
| 591 DebugRectHistory* debug_rect_history) const { | 591 DebugRectHistory* debug_rect_history) const { |
| 592 const std::vector<DebugRect>& debug_rects = debug_rect_history->debug_rects(); | 592 const std::vector<DebugRect>& debug_rects = debug_rect_history->debug_rects(); |
| 593 SkPaint paint = CreatePaint(); | 593 SkPaint paint = CreatePaint(); |
| 594 DebugColors::CyclePaintRectColor(); |
| 594 | 595 |
| 595 for (size_t i = 0; i < debug_rects.size(); ++i) { | 596 for (size_t i = 0; i < debug_rects.size(); ++i) { |
| 596 SkColor stroke_color = 0; | 597 SkColor stroke_color = 0; |
| 597 SkColor fill_color = 0; | 598 SkColor fill_color = 0; |
| 598 float stroke_width = 0.f; | 599 float stroke_width = 0.f; |
| 599 std::string label_text; | 600 std::string label_text; |
| 600 | 601 |
| 601 switch (debug_rects[i].type) { | 602 switch (debug_rects[i].type) { |
| 602 case PAINT_RECT_TYPE: | 603 case PAINT_RECT_TYPE: |
| 603 stroke_color = DebugColors::PaintRectBorderColor(); | 604 stroke_color = DebugColors::PaintRectBorderColor(); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { | 709 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { |
| 709 return "cc::HeadsUpDisplayLayerImpl"; | 710 return "cc::HeadsUpDisplayLayerImpl"; |
| 710 } | 711 } |
| 711 | 712 |
| 712 void HeadsUpDisplayLayerImpl::AsValueInto(base::DictionaryValue* dict) const { | 713 void HeadsUpDisplayLayerImpl::AsValueInto(base::DictionaryValue* dict) const { |
| 713 LayerImpl::AsValueInto(dict); | 714 LayerImpl::AsValueInto(dict); |
| 714 dict->SetString("layer_name", "Heads Up Display Layer"); | 715 dict->SetString("layer_name", "Heads Up Display Layer"); |
| 715 } | 716 } |
| 716 | 717 |
| 717 } // namespace cc | 718 } // namespace cc |
| OLD | NEW |