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

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

Issue 121223002: DevTools: Change paint rectangles' colors in compositor to shades of green. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small refactorings. Created 6 years, 10 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 unified diff | Download patch
« cc/debug/debug_colors.cc ('K') | « cc/debug/debug_colors.cc ('k') | no next file » | 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/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« cc/debug/debug_colors.cc ('K') | « cc/debug/debug_colors.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698