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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 SurfaceDrawQuad* surface_draw_quad = | 116 SurfaceDrawQuad* surface_draw_quad = |
117 render_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); | 117 render_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); |
118 surface_draw_quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, | 118 surface_draw_quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, |
119 surface_info.id(), surface_draw_quad_type, nullptr); | 119 surface_info.id(), surface_draw_quad_type, nullptr); |
120 return surface_draw_quad; | 120 return surface_draw_quad; |
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(layer_tree_impl()); | 126 *width = DebugColors::SurfaceLayerBorderWidth( |
| 127 layer_tree_impl() ? layer_tree_impl()->device_scale_factor() : 1); |
127 } | 128 } |
128 | 129 |
129 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) { | 130 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) { |
130 if (!ShowDebugBorders()) | 131 if (!ShowDebugBorders()) |
131 return; | 132 return; |
132 | 133 |
133 SharedQuadState* shared_quad_state = | 134 SharedQuadState* shared_quad_state = |
134 render_pass->CreateAndAppendSharedQuadState(); | 135 render_pass->CreateAndAppendSharedQuadState(); |
135 PopulateSharedQuadState(shared_quad_state); | 136 PopulateSharedQuadState(shared_quad_state); |
136 | 137 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 dict->SetString("surface_id", primary_surface_info_.id().ToString()); | 219 dict->SetString("surface_id", primary_surface_info_.id().ToString()); |
219 dict->SetString("fallback_surface_id", | 220 dict->SetString("fallback_surface_id", |
220 fallback_surface_info_.id().ToString()); | 221 fallback_surface_info_.id().ToString()); |
221 } | 222 } |
222 | 223 |
223 const char* SurfaceLayerImpl::LayerTypeAsString() const { | 224 const char* SurfaceLayerImpl::LayerTypeAsString() const { |
224 return "cc::SurfaceLayerImpl"; | 225 return "cc::SurfaceLayerImpl"; |
225 } | 226 } |
226 | 227 |
227 } // namespace cc | 228 } // namespace cc |
OLD | NEW |