Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: cc/layers/layer_impl.cc

Issue 16903005: Add layer name into frame viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698