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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 853393002: cc: refactor of MathUtil::AddToTracedValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « cc/resources/tile.cc ('k') | 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 3280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 } 3291 }
3292 3292
3293 void LayerTreeHostImpl::AsValueWithFrameInto( 3293 void LayerTreeHostImpl::AsValueWithFrameInto(
3294 FrameData* frame, 3294 FrameData* frame,
3295 base::debug::TracedValue* state) const { 3295 base::debug::TracedValue* state) const {
3296 if (this->pending_tree_) { 3296 if (this->pending_tree_) {
3297 state->BeginDictionary("activation_state"); 3297 state->BeginDictionary("activation_state");
3298 ActivationStateAsValueInto(state); 3298 ActivationStateAsValueInto(state);
3299 state->EndDictionary(); 3299 state->EndDictionary();
3300 } 3300 }
3301 state->BeginDictionary("device_viewport_size"); 3301 MathUtil::AddToTracedValue("device_viewport_size", device_viewport_size_,
3302 MathUtil::AddToTracedValue(device_viewport_size_, state); 3302 state);
3303 state->EndDictionary();
3304 3303
3305 std::set<const Tile*> tiles; 3304 std::set<const Tile*> tiles;
3306 active_tree_->GetAllTilesForTracing(&tiles); 3305 active_tree_->GetAllTilesForTracing(&tiles);
3307 if (pending_tree_) 3306 if (pending_tree_)
3308 pending_tree_->GetAllTilesForTracing(&tiles); 3307 pending_tree_->GetAllTilesForTracing(&tiles);
3309 3308
3310 state->BeginArray("active_tiles"); 3309 state->BeginArray("active_tiles");
3311 for (std::set<const Tile*>::const_iterator it = tiles.begin(); 3310 for (std::set<const Tile*>::const_iterator it = tiles.begin();
3312 it != tiles.end(); 3311 it != tiles.end();
3313 ++it) { 3312 ++it) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 } 3507 }
3509 3508
3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3509 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3511 std::vector<PictureLayerImpl*>::iterator it = 3510 std::vector<PictureLayerImpl*>::iterator it =
3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3511 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3513 DCHECK(it != picture_layers_.end()); 3512 DCHECK(it != picture_layers_.end());
3514 picture_layers_.erase(it); 3513 picture_layers_.erase(it);
3515 } 3514 }
3516 3515
3517 } // namespace cc 3516 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698