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

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

Issue 493543002: cc: Report only on active tiles in tracing. (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
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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set>
9 10
10 #include "base/debug/trace_event_argument.h" 11 #include "base/debug/trace_event_argument.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "cc/base/math_util.h" 13 #include "cc/base/math_util.h"
13 #include "cc/base/util.h" 14 #include "cc/base/util.h"
14 #include "cc/debug/debug_colors.h" 15 #include "cc/debug/debug_colors.h"
15 #include "cc/debug/micro_benchmark_impl.h" 16 #include "cc/debug/micro_benchmark_impl.h"
16 #include "cc/debug/traced_value.h" 17 #include "cc/debug/traced_value.h"
17 #include "cc/layers/append_quads_data.h" 18 #include "cc/layers/append_quads_data.h"
18 #include "cc/output/begin_frame_args.h" 19 #include "cc/output/begin_frame_args.h"
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale); 1331 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale);
1331 } 1332 }
1332 1333
1333 void PictureLayerImpl::GetDebugBorderProperties( 1334 void PictureLayerImpl::GetDebugBorderProperties(
1334 SkColor* color, 1335 SkColor* color,
1335 float* width) const { 1336 float* width) const {
1336 *color = DebugColors::TiledContentLayerBorderColor(); 1337 *color = DebugColors::TiledContentLayerBorderColor();
1337 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); 1338 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl());
1338 } 1339 }
1339 1340
1341 void PictureLayerImpl::AllTilesForTracingInto(
1342 std::set<const Tile*>* tiles) const {
1343 if (!tilings_)
1344 return;
1345
1346 for (size_t i = 0; i < tilings_->num_tilings(); ++i)
1347 tilings_->tiling_at(i)->AllTilesForTracingInto(tiles);
1348 }
1349
1340 void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const { 1350 void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const {
1341 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); 1351 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
1342 LayerImpl::AsValueInto(state); 1352 LayerImpl::AsValueInto(state);
1343 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); 1353 state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
1344 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); 1354 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale());
1345 state->BeginArray("tilings"); 1355 state->BeginArray("tilings");
1346 tilings_->AsValueInto(state); 1356 tilings_->AsValueInto(state);
1347 state->EndArray(); 1357 state->EndArray();
1348 1358
1349 state->BeginArray("pictures"); 1359 state->BeginArray("pictures");
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); 1707 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange();
1698 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; 1708 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start;
1699 return tiling_range.end - 1 - current_tiling_range_offset; 1709 return tiling_range.end - 1 - current_tiling_range_offset;
1700 } 1710 }
1701 } 1711 }
1702 NOTREACHED(); 1712 NOTREACHED();
1703 return 0; 1713 return 0;
1704 } 1714 }
1705 1715
1706 } // namespace cc 1716 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698