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

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

Issue 147603006: [#7] Resubmitted - Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmit 145313006 Created 6 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/tile_manager.h ('k') | cc/resources/tile_manager_unittest.cc » ('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/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 bytes_releasable_ += BytesConsumedIfAllocated(tile); 950 bytes_releasable_ += BytesConsumedIfAllocated(tile);
951 ++resources_releasable_; 951 ++resources_releasable_;
952 } 952 }
953 953
954 FreeUnusedResourcesForTile(tile); 954 FreeUnusedResourcesForTile(tile);
955 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0) 955 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0)
956 did_initialize_visible_tile_ = true; 956 did_initialize_visible_tile_ = true;
957 } 957 }
958 958
959 scoped_refptr<Tile> TileManager::CreateTile(PicturePileImpl* picture_pile, 959 scoped_refptr<Tile> TileManager::CreateTile(PicturePileImpl* picture_pile,
960 gfx::Size tile_size, 960 const gfx::Size& tile_size,
961 const gfx::Rect& content_rect, 961 const gfx::Rect& content_rect,
962 const gfx::Rect& opaque_rect, 962 const gfx::Rect& opaque_rect,
963 float contents_scale, 963 float contents_scale,
964 int layer_id, 964 int layer_id,
965 int source_frame_number, 965 int source_frame_number,
966 int flags) { 966 int flags) {
967 scoped_refptr<Tile> tile = make_scoped_refptr(new Tile(this, 967 scoped_refptr<Tile> tile = make_scoped_refptr(new Tile(this,
968 picture_pile, 968 picture_pile,
969 tile_size, 969 tile_size,
970 content_rect, 970 content_rect,
971 opaque_rect, 971 opaque_rect,
972 contents_scale, 972 contents_scale,
973 layer_id, 973 layer_id,
974 source_frame_number, 974 source_frame_number,
975 flags)); 975 flags));
976 DCHECK(tiles_.find(tile->id()) == tiles_.end()); 976 DCHECK(tiles_.find(tile->id()) == tiles_.end());
977 977
978 tiles_[tile->id()] = tile; 978 tiles_[tile->id()] = tile;
979 used_layer_counts_[tile->layer_id()]++; 979 used_layer_counts_[tile->layer_id()]++;
980 prioritized_tiles_dirty_ = true; 980 prioritized_tiles_dirty_ = true;
981 return tile; 981 return tile;
982 } 982 }
983 983
984 } // namespace cc 984 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698