| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 | 129 |
| 130 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color, | 130 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color, |
| 131 float* width) const { | 131 float* width) const { |
| 132 *color = DebugColors::SurfaceLayerBorderColor(); | 132 *color = DebugColors::SurfaceLayerBorderColor(); |
| 133 *width = DebugColors::SurfaceLayerBorderWidth( | 133 *width = DebugColors::SurfaceLayerBorderWidth( |
| 134 layer_tree_impl() ? layer_tree_impl()->device_scale_factor() : 1); | 134 layer_tree_impl() ? layer_tree_impl()->device_scale_factor() : 1); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) { | 137 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) { |
| 138 if (!ShowDebugBorders()) | 138 if (!ShowDebugBorders(DebugBorderType::SURFACE)) |
| 139 return; | 139 return; |
| 140 | 140 |
| 141 SharedQuadState* shared_quad_state = | 141 SharedQuadState* shared_quad_state = |
| 142 render_pass->CreateAndAppendSharedQuadState(); | 142 render_pass->CreateAndAppendSharedQuadState(); |
| 143 PopulateSharedQuadState(shared_quad_state); | 143 PopulateSharedQuadState(shared_quad_state); |
| 144 | 144 |
| 145 SkColor color; | 145 SkColor color; |
| 146 float border_width; | 146 float border_width; |
| 147 GetDebugBorderProperties(&color, &border_width); | 147 GetDebugBorderProperties(&color, &border_width); |
| 148 | 148 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 dict->SetString("surface_id", primary_surface_info_.id().ToString()); | 226 dict->SetString("surface_id", primary_surface_info_.id().ToString()); |
| 227 dict->SetString("fallback_surface_id", | 227 dict->SetString("fallback_surface_id", |
| 228 fallback_surface_info_.id().ToString()); | 228 fallback_surface_info_.id().ToString()); |
| 229 } | 229 } |
| 230 | 230 |
| 231 const char* SurfaceLayerImpl::LayerTypeAsString() const { | 231 const char* SurfaceLayerImpl::LayerTypeAsString() const { |
| 232 return "cc::SurfaceLayerImpl"; | 232 return "cc::SurfaceLayerImpl"; |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace cc | 235 } // namespace cc |
| OLD | NEW |