| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/surface_layer_impl.h" | 5 #include "cc/layers/surface_layer_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/trace_event/trace_event_argument.h" | 9 #include "base/trace_event/trace_event_argument.h" |
| 10 #include "cc/debug/debug_colors.h" | 10 #include "cc/debug/debug_colors.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 | 122 |
| 123 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color, | 123 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color, |
| 124 float* width) const { | 124 float* width) const { |
| 125 *color = DebugColors::SurfaceLayerBorderColor(); | 125 *color = DebugColors::SurfaceLayerBorderColor(); |
| 126 *width = DebugColors::SurfaceLayerBorderWidth( | 126 *width = DebugColors::SurfaceLayerBorderWidth( |
| 127 layer_tree_impl() ? layer_tree_impl()->device_scale_factor() : 1); | 127 layer_tree_impl() ? layer_tree_impl()->device_scale_factor() : 1); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) { | 130 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) { |
| 131 if (!ShowDebugBorders()) | 131 if (!ShowDebugBorders(DebugBorderType::SURFACE)) |
| 132 return; | 132 return; |
| 133 | 133 |
| 134 SharedQuadState* shared_quad_state = | 134 SharedQuadState* shared_quad_state = |
| 135 render_pass->CreateAndAppendSharedQuadState(); | 135 render_pass->CreateAndAppendSharedQuadState(); |
| 136 PopulateSharedQuadState(shared_quad_state); | 136 PopulateSharedQuadState(shared_quad_state); |
| 137 | 137 |
| 138 SkColor color; | 138 SkColor color; |
| 139 float border_width; | 139 float border_width; |
| 140 GetDebugBorderProperties(&color, &border_width); | 140 GetDebugBorderProperties(&color, &border_width); |
| 141 | 141 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 dict->SetString("surface_id", primary_surface_info_.id().ToString()); | 219 dict->SetString("surface_id", primary_surface_info_.id().ToString()); |
| 220 dict->SetString("fallback_surface_id", | 220 dict->SetString("fallback_surface_id", |
| 221 fallback_surface_info_.id().ToString()); | 221 fallback_surface_info_.id().ToString()); |
| 222 } | 222 } |
| 223 | 223 |
| 224 const char* SurfaceLayerImpl::LayerTypeAsString() const { | 224 const char* SurfaceLayerImpl::LayerTypeAsString() const { |
| 225 return "cc::SurfaceLayerImpl"; | 225 return "cc::SurfaceLayerImpl"; |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace cc | 228 } // namespace cc |
| OLD | NEW |