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

Side by Side Diff: cc/resources/picture_layer_tiling_set.cc

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/picture_layer_tiling_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 void PictureLayerTilingSet::DidBecomeActive() { 310 void PictureLayerTilingSet::DidBecomeActive() {
311 for (size_t i = 0; i < tilings_.size(); ++i) 311 for (size_t i = 0; i < tilings_.size(); ++i)
312 tilings_[i]->DidBecomeActive(); 312 tilings_[i]->DidBecomeActive();
313 } 313 }
314 314
315 void PictureLayerTilingSet::DidBecomeRecycled() { 315 void PictureLayerTilingSet::DidBecomeRecycled() {
316 for (size_t i = 0; i < tilings_.size(); ++i) 316 for (size_t i = 0; i < tilings_.size(); ++i)
317 tilings_[i]->DidBecomeRecycled(); 317 tilings_[i]->DidBecomeRecycled();
318 } 318 }
319 319
320 void PictureLayerTilingSet::AsValueInto(base::debug::TracedValue* state) const { 320 scoped_ptr<base::Value> PictureLayerTilingSet::AsValue() const {
321 for (size_t i = 0; i < tilings_.size(); ++i) { 321 scoped_ptr<base::ListValue> state(new base::ListValue());
322 state->BeginDictionary(); 322 for (size_t i = 0; i < tilings_.size(); ++i)
323 tilings_[i]->AsValueInto(state); 323 state->Append(tilings_[i]->AsValue().release());
324 state->EndDictionary(); 324 return state.PassAs<base::Value>();
325 }
326 } 325 }
327 326
328 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const { 327 size_t PictureLayerTilingSet::GPUMemoryUsageInBytes() const {
329 size_t amount = 0; 328 size_t amount = 0;
330 for (size_t i = 0; i < tilings_.size(); ++i) 329 for (size_t i = 0; i < tilings_.size(); ++i)
331 amount += tilings_[i]->GPUMemoryUsageInBytes(); 330 amount += tilings_[i]->GPUMemoryUsageInBytes();
332 return amount; 331 return amount;
333 } 332 }
334 333
335 } // namespace cc 334 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698