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

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("current_visible_rect", current_visible_rect_,
enne (OOO) 2015/03/19 19:15:21 Do you need the word current in all of these?
vmpstr 2015/03/19 19:38:19 Done.
888 state);
889 MathUtil::AddToTracedValue("current_skewport_rect", current_skewport_rect_,
890 state);
891 MathUtil::AddToTracedValue("current_soon_border_rect",
enne (OOO) 2015/03/19 19:15:21 Also, why "soon_border" vs just "soon"? I'm not su
vmpstr 2015/03/19 19:38:19 Eh, I'm just following the name of the variable. I
892 current_soon_border_rect_, state);
893 MathUtil::AddToTracedValue("current_eventually_rect",
894 current_eventually_rect_, state);
887 MathUtil::AddToTracedValue("tiling_size", tiling_size(), state); 895 MathUtil::AddToTracedValue("tiling_size", tiling_size(), state);
888 } 896 }
889 897
890 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { 898 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const {
891 size_t amount = 0; 899 size_t amount = 0;
892 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { 900 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
893 const Tile* tile = it->second.get(); 901 const Tile* tile = it->second.get();
894 amount += tile->GPUMemoryUsageInBytes(); 902 amount += tile->GPUMemoryUsageInBytes();
895 } 903 }
896 return amount; 904 return amount;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 break; 1049 break;
1042 } 1050 }
1043 1051
1044 gfx::Rect result(origin_x, origin_y, width, height); 1052 gfx::Rect result(origin_x, origin_y, width, height);
1045 if (cache) 1053 if (cache)
1046 cache->previous_result = result; 1054 cache->previous_result = result;
1047 return result; 1055 return result;
1048 } 1056 }
1049 1057
1050 } // namespace cc 1058 } // 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