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/strings/stringprintf.h" | 8 #include "base/strings/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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1135 | 1135 |
1136 if (reasons & kCompositingReasonLayerForMask) | 1136 if (reasons & kCompositingReasonLayerForMask) |
1137 reason_list->AppendString("Is a mask layer"); | 1137 reason_list->AppendString("Is a mask layer"); |
1138 | 1138 |
1139 return reason_list.PassAs<base::Value>(); | 1139 return reason_list.PassAs<base::Value>(); |
1140 } | 1140 } |
1141 | 1141 |
1142 void LayerImpl::AsValueInto(base::DictionaryValue* state) const { | 1142 void LayerImpl::AsValueInto(base::DictionaryValue* state) const { |
1143 TracedValue::MakeDictIntoImplicitSnapshot(state, LayerTypeAsString(), this); | 1143 TracedValue::MakeDictIntoImplicitSnapshot(state, LayerTypeAsString(), this); |
1144 state->SetInteger("layer_id", id()); | 1144 state->SetInteger("layer_id", id()); |
1145 state->SetString("layer_name", debug_name()); | |
enne (OOO)
2013/06/17 17:25:38
Debug names are only set in debug mode. Won't thi
| |
1145 state->Set("bounds", MathUtil::AsValue(bounds()).release()); | 1146 state->Set("bounds", MathUtil::AsValue(bounds()).release()); |
1146 state->SetInteger("draws_content", DrawsContent()); | 1147 state->SetInteger("draws_content", DrawsContent()); |
1147 state->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes()); | 1148 state->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes()); |
1148 state->Set("compositing_reasons", | 1149 state->Set("compositing_reasons", |
1149 CompositingReasonsAsValue(compositing_reasons_).release()); | 1150 CompositingReasonsAsValue(compositing_reasons_).release()); |
1150 | 1151 |
1151 bool clipped; | 1152 bool clipped; |
1152 gfx::QuadF layer_quad = MathUtil::MapQuad( | 1153 gfx::QuadF layer_quad = MathUtil::MapQuad( |
1153 screen_space_transform(), | 1154 screen_space_transform(), |
1154 gfx::QuadF(gfx::Rect(content_bounds())), | 1155 gfx::QuadF(gfx::Rect(content_bounds())), |
(...skipping 13 matching lines...) Expand all Loading... | |
1168 | 1169 |
1169 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } | 1170 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } |
1170 | 1171 |
1171 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1172 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
1172 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1173 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1173 AsValueInto(state.get()); | 1174 AsValueInto(state.get()); |
1174 return state.PassAs<base::Value>(); | 1175 return state.PassAs<base::Value>(); |
1175 } | 1176 } |
1176 | 1177 |
1177 } // namespace cc | 1178 } // namespace cc |
OLD | NEW |