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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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/scheduler/texture_uploader.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/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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 ++resources_releasable_; 962 ++resources_releasable_;
963 } 963 }
964 964
965 FreeUnusedResourcesForTile(tile); 965 FreeUnusedResourcesForTile(tile);
966 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0) 966 if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0)
967 did_initialize_visible_tile_ = true; 967 did_initialize_visible_tile_ = true;
968 } 968 }
969 969
970 scoped_refptr<Tile> TileManager::CreateTile(PicturePileImpl* picture_pile, 970 scoped_refptr<Tile> TileManager::CreateTile(PicturePileImpl* picture_pile,
971 gfx::Size tile_size, 971 gfx::Size tile_size,
972 gfx::Rect content_rect, 972 const gfx::Rect& content_rect,
973 gfx::Rect opaque_rect, 973 const gfx::Rect& opaque_rect,
974 float contents_scale, 974 float contents_scale,
975 int layer_id, 975 int layer_id,
976 int source_frame_number, 976 int source_frame_number,
977 int flags) { 977 int flags) {
978 scoped_refptr<Tile> tile = make_scoped_refptr(new Tile(this, 978 scoped_refptr<Tile> tile = make_scoped_refptr(new Tile(this,
979 picture_pile, 979 picture_pile,
980 tile_size, 980 tile_size,
981 content_rect, 981 content_rect,
982 opaque_rect, 982 opaque_rect,
983 contents_scale, 983 contents_scale,
984 layer_id, 984 layer_id,
985 source_frame_number, 985 source_frame_number,
986 flags)); 986 flags));
987 DCHECK(tiles_.find(tile->id()) == tiles_.end()); 987 DCHECK(tiles_.find(tile->id()) == tiles_.end());
988 988
989 tiles_[tile->id()] = tile; 989 tiles_[tile->id()] = tile;
990 used_layer_counts_[tile->layer_id()]++; 990 used_layer_counts_[tile->layer_id()]++;
991 prioritized_tiles_dirty_ = true; 991 prioritized_tiles_dirty_ = true;
992 return tile; 992 return tile;
993 } 993 }
994 994
995 } // namespace cc 995 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/scheduler/texture_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698