OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
10 #include "cc/animation/scrollbar_animation_controller.h" | 10 #include "cc/animation/scrollbar_animation_controller.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } | 187 } |
188 | 188 |
189 *color = DebugColors::ContainerLayerBorderColor(); | 189 *color = DebugColors::ContainerLayerBorderColor(); |
190 *width = DebugColors::ContainerLayerBorderWidth(layer_tree_impl()); | 190 *width = DebugColors::ContainerLayerBorderWidth(layer_tree_impl()); |
191 } | 191 } |
192 | 192 |
193 void LayerImpl::AppendDebugBorderQuad( | 193 void LayerImpl::AppendDebugBorderQuad( |
194 QuadSink* quad_sink, | 194 QuadSink* quad_sink, |
195 const SharedQuadState* shared_quad_state, | 195 const SharedQuadState* shared_quad_state, |
196 AppendQuadsData* append_quads_data) const { | 196 AppendQuadsData* append_quads_data) const { |
| 197 SkColor color; |
| 198 float width; |
| 199 GetDebugBorderProperties(&color, &width); |
| 200 AppendDebugBorderQuad( |
| 201 quad_sink, shared_quad_state, append_quads_data, color, width); |
| 202 } |
| 203 |
| 204 void LayerImpl::AppendDebugBorderQuad(QuadSink* quad_sink, |
| 205 const SharedQuadState* shared_quad_state, |
| 206 AppendQuadsData* append_quads_data, |
| 207 SkColor color, |
| 208 float width) const { |
197 if (!ShowDebugBorders()) | 209 if (!ShowDebugBorders()) |
198 return; | 210 return; |
199 | 211 |
200 SkColor color; | |
201 float width; | |
202 GetDebugBorderProperties(&color, &width); | |
203 | |
204 gfx::Rect content_rect(content_bounds()); | 212 gfx::Rect content_rect(content_bounds()); |
205 scoped_ptr<DebugBorderDrawQuad> debug_border_quad = | 213 scoped_ptr<DebugBorderDrawQuad> debug_border_quad = |
206 DebugBorderDrawQuad::Create(); | 214 DebugBorderDrawQuad::Create(); |
207 debug_border_quad->SetNew(shared_quad_state, content_rect, color, width); | 215 debug_border_quad->SetNew(shared_quad_state, content_rect, color, width); |
208 quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(), append_quads_data); | 216 quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(), append_quads_data); |
209 } | 217 } |
210 | 218 |
211 bool LayerImpl::HasDelegatedContent() const { | 219 bool LayerImpl::HasDelegatedContent() const { |
212 return false; | 220 return false; |
213 } | 221 } |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 | 1038 |
1031 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } | 1039 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } |
1032 | 1040 |
1033 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1041 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
1034 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1042 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1035 AsValueInto(state.get()); | 1043 AsValueInto(state.get()); |
1036 return state.PassAs<base::Value>(); | 1044 return state.PassAs<base::Value>(); |
1037 } | 1045 } |
1038 | 1046 |
1039 } // namespace cc | 1047 } // namespace cc |
OLD | NEW |