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

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: update Created 6 years, 3 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/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.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/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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale); 1398 ideal_source_scale_ = std::max(ideal_source_scale, min_source_scale);
1398 } 1399 }
1399 1400
1400 void PictureLayerImpl::GetDebugBorderProperties( 1401 void PictureLayerImpl::GetDebugBorderProperties(
1401 SkColor* color, 1402 SkColor* color,
1402 float* width) const { 1403 float* width) const {
1403 *color = DebugColors::TiledContentLayerBorderColor(); 1404 *color = DebugColors::TiledContentLayerBorderColor();
1404 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); 1405 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl());
1405 } 1406 }
1406 1407
1408 void PictureLayerImpl::GetAllTilesForTracing(
1409 std::set<const Tile*>* tiles) const {
1410 if (!tilings_)
1411 return;
1412
1413 for (size_t i = 0; i < tilings_->num_tilings(); ++i)
1414 tilings_->tiling_at(i)->GetAllTilesForTracing(tiles);
1415 }
1416
1407 void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const { 1417 void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const {
1408 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); 1418 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
1409 LayerImpl::AsValueInto(state); 1419 LayerImpl::AsValueInto(state);
1410 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); 1420 state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
1411 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); 1421 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale());
1412 state->BeginArray("tilings"); 1422 state->BeginArray("tilings");
1413 tilings_->AsValueInto(state); 1423 tilings_->AsValueInto(state);
1414 state->EndArray(); 1424 state->EndArray();
1415 1425
1416 state->BeginArray("pictures"); 1426 state->BeginArray("pictures");
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); 1774 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange();
1765 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; 1775 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start;
1766 return tiling_range.end - 1 - current_tiling_range_offset; 1776 return tiling_range.end - 1 - current_tiling_range_offset;
1767 } 1777 }
1768 } 1778 }
1769 NOTREACHED(); 1779 NOTREACHED();
1770 return 0; 1780 return 0;
1771 } 1781 }
1772 1782
1773 } // namespace cc 1783 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698