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

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

Issue 879913002: mechanical rename of base::debug -> base::trace_event for /cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part3
Patch Set: Edited a comment Created 5 years, 10 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/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.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/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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 tree, 859 tree,
860 TilePriority(resolution_, TilePriority::EVENTUALLY, distance_to_visible)); 860 TilePriority(resolution_, TilePriority::EVENTUALLY, distance_to_visible));
861 } 861 }
862 862
863 void PictureLayerTiling::GetAllTilesForTracing( 863 void PictureLayerTiling::GetAllTilesForTracing(
864 std::set<const Tile*>* tiles) const { 864 std::set<const Tile*>* tiles) const {
865 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 865 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
866 tiles->insert(it->second.get()); 866 tiles->insert(it->second.get());
867 } 867 }
868 868
869 void PictureLayerTiling::AsValueInto(base::debug::TracedValue* state) const { 869 void PictureLayerTiling::AsValueInto(
870 base::trace_event::TracedValue* state) const {
870 state->SetInteger("num_tiles", tiles_.size()); 871 state->SetInteger("num_tiles", tiles_.size());
871 state->SetDouble("content_scale", contents_scale_); 872 state->SetDouble("content_scale", contents_scale_);
872 MathUtil::AddToTracedValue("tiling_size", tiling_size(), state); 873 MathUtil::AddToTracedValue("tiling_size", tiling_size(), state);
873 } 874 }
874 875
875 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { 876 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const {
876 size_t amount = 0; 877 size_t amount = 0;
877 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { 878 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
878 const Tile* tile = it->second.get(); 879 const Tile* tile = it->second.get();
879 amount += tile->GPUMemoryUsageInBytes(); 880 amount += tile->GPUMemoryUsageInBytes();
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 break; 1027 break;
1027 } 1028 }
1028 1029
1029 gfx::Rect result(origin_x, origin_y, width, height); 1030 gfx::Rect result(origin_x, origin_y, width, height);
1030 if (cache) 1031 if (cache)
1031 cache->previous_result = result; 1032 cache->previous_result = result;
1032 return result; 1033 return result;
1033 } 1034 }
1034 1035
1035 } // namespace cc 1036 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698