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

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

Issue 1019353002: cc: Add priority rects to tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 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.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 void PictureLayerTiling::GetAllTilesForTracing( 877 void PictureLayerTiling::GetAllTilesForTracing(
878 std::set<const Tile*>* tiles) const { 878 std::set<const Tile*>* tiles) const {
879 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 879 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
880 tiles->insert(it->second.get()); 880 tiles->insert(it->second.get());
881 } 881 }
882 882
883 void PictureLayerTiling::AsValueInto( 883 void PictureLayerTiling::AsValueInto(
884 base::trace_event::TracedValue* state) const { 884 base::trace_event::TracedValue* state) const {
885 state->SetInteger("num_tiles", tiles_.size()); 885 state->SetInteger("num_tiles", tiles_.size());
886 state->SetDouble("content_scale", contents_scale_); 886 state->SetDouble("content_scale", contents_scale_);
887 MathUtil::AddToTracedValue("visible_rect", current_visible_rect_, state);
888 MathUtil::AddToTracedValue("skewport_rect", current_skewport_rect_, state);
889 MathUtil::AddToTracedValue("soon_rect", current_soon_border_rect_, state);
890 MathUtil::AddToTracedValue("eventually_rect", current_eventually_rect_,
891 state);
887 MathUtil::AddToTracedValue("tiling_size", tiling_size(), state); 892 MathUtil::AddToTracedValue("tiling_size", tiling_size(), state);
888 } 893 }
889 894
890 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { 895 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const {
891 size_t amount = 0; 896 size_t amount = 0;
892 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { 897 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
893 const Tile* tile = it->second.get(); 898 const Tile* tile = it->second.get();
894 amount += tile->GPUMemoryUsageInBytes(); 899 amount += tile->GPUMemoryUsageInBytes();
895 } 900 }
896 return amount; 901 return amount;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 break; 1046 break;
1042 } 1047 }
1043 1048
1044 gfx::Rect result(origin_x, origin_y, width, height); 1049 gfx::Rect result(origin_x, origin_y, width, height);
1045 if (cache) 1050 if (cache)
1046 cache->previous_result = result; 1051 cache->previous_result = result;
1047 return result; 1052 return result;
1048 } 1053 }
1049 1054
1050 } // namespace cc 1055 } // 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