| 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/debug_colors.h" | 5 #include "cc/debug_colors.h" |
| 6 | 6 |
| 7 #include "cc/layer_tree_impl.h" | 7 #include "cc/layer_tree_impl.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| 11 static const float Scale(float width, const LayerTreeImpl* tree_impl) { | 11 static const float Scale(float width, const LayerTreeImpl* tree_impl) { |
| 12 return width * (tree_impl ? tree_impl->device_scale_factor() : 1); | 12 return width * (tree_impl ? tree_impl->device_scale_factor() : 1); |
| 13 } | 13 } |
| 14 | 14 |
| 15 // ======= Layer border colors ======= | 15 // ======= Layer border colors ======= |
| 16 | 16 |
| 17 // Tiled content layers are orange. | 17 // Tiled content layers are orange. |
| 18 SkColor DebugColors::TiledContentLayerBorderColor() { return SkColorSetARGB(128,
255, 128, 0); } | 18 SkColor DebugColors::TiledContentLayerBorderColor() { return SkColorSetARGB(128,
255, 128, 0); } |
| 19 int DebugColors::TiledContentLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl); } | 19 int DebugColors::TiledContentLayerBorderWidth(const LayerTreeImpl* tree_impl) {
return Scale(2, tree_impl); } |
| 20 | 20 |
| 21 // Image layers are olive. |
| 22 SkColor DebugColors::ImageLayerBorderColor() { return SkColorSetARGB(128, 128, 1
28, 0); } |
| 23 int DebugColors::ImageLayerBorderWidth(const LayerTreeImpl* tree_impl) { return
Scale(2, tree_impl); } |
| 24 |
| 21 // Non-tiled content layers area green. | 25 // Non-tiled content layers area green. |
| 22 SkColor DebugColors::ContentLayerBorderColor() { return SkColorSetARGB(128, 0, 1
28, 32); } | 26 SkColor DebugColors::ContentLayerBorderColor() { return SkColorSetARGB(128, 0, 1
28, 32); } |
| 23 int DebugColors::ContentLayerBorderWidth(const LayerTreeImpl* tree_impl) { retur
n Scale(2, tree_impl); } | 27 int DebugColors::ContentLayerBorderWidth(const LayerTreeImpl* tree_impl) { retur
n Scale(2, tree_impl); } |
| 24 | 28 |
| 25 // Masking layers are pale blue and wide. | 29 // Masking layers are pale blue and wide. |
| 26 SkColor DebugColors::MaskingLayerBorderColor() { return SkColorSetARGB(48, 128,
255, 255); } | 30 SkColor DebugColors::MaskingLayerBorderColor() { return SkColorSetARGB(48, 128,
255, 255); } |
| 27 int DebugColors::MaskingLayerBorderWidth(const LayerTreeImpl* tree_impl) { retur
n Scale(20, tree_impl); } | 31 int DebugColors::MaskingLayerBorderWidth(const LayerTreeImpl* tree_impl) { retur
n Scale(20, tree_impl); } |
| 28 | 32 |
| 29 // Other container layers are yellow. | 33 // Other container layers are yellow. |
| 30 SkColor DebugColors::ContainerLayerBorderColor() { return SkColorSetARGB(192, 25
5, 255, 0); } | 34 SkColor DebugColors::ContainerLayerBorderColor() { return SkColorSetARGB(192, 25
5, 255, 0); } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 118 |
| 115 // ======= HUD widget colors ======= | 119 // ======= HUD widget colors ======= |
| 116 | 120 |
| 117 SkColor DebugColors::PlatformLayerTreeTextColor() { return SK_ColorRED; } | 121 SkColor DebugColors::PlatformLayerTreeTextColor() { return SK_ColorRED; } |
| 118 SkColor DebugColors::FPSDisplayTextAndGraphColor() { return SK_ColorRED; } | 122 SkColor DebugColors::FPSDisplayTextAndGraphColor() { return SK_ColorRED; } |
| 119 | 123 |
| 120 // Paint time display has the same green as used for paint time in the WebInspec
tor | 124 // Paint time display has the same green as used for paint time in the WebInspec
tor |
| 121 SkColor DebugColors::PaintTimeDisplayTextAndGraphColor() { return SkColorSetRGB(
95, 160, 80); } | 125 SkColor DebugColors::PaintTimeDisplayTextAndGraphColor() { return SkColorSetRGB(
95, 160, 80); } |
| 122 | 126 |
| 123 } // namespace cc | 127 } // namespace cc |
| OLD | NEW |