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

Side by Side Diff: cc/test/fake_tile_manager.cc

Issue 246673005: cc: Start using raster/eviction iterators in tile manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 6 years, 7 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 | Annotate | Revision Log
« cc/resources/tile_manager.cc ('K') | « cc/test/fake_tile_manager.h ('k') | 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/test/fake_tile_manager.h" 5 #include "cc/test/fake_tile_manager.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 g_fake_rasterizer.Pointer(), 101 g_fake_rasterizer.Pointer(),
102 raster_task_limit_bytes, 102 raster_task_limit_bytes,
103 true, 103 true,
104 NULL) {} 104 NULL) {}
105 105
106 FakeTileManager::~FakeTileManager() {} 106 FakeTileManager::~FakeTileManager() {}
107 107
108 void FakeTileManager::AssignMemoryToTiles( 108 void FakeTileManager::AssignMemoryToTiles(
109 const GlobalStateThatImpactsTilePriority& state) { 109 const GlobalStateThatImpactsTilePriority& state) {
110 tiles_for_raster.clear(); 110 tiles_for_raster.clear();
111 all_tiles.Clear();
112 111
113 SetGlobalStateForTesting(state); 112 SetGlobalStateForTesting(state);
114 GetTilesWithAssignedBins(&all_tiles); 113 AssignGpuMemoryToTiles(&tiles_for_raster);
115 AssignGpuMemoryToTiles(&all_tiles, &tiles_for_raster);
116 } 114 }
117 115
118 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { 116 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) {
119 return std::find(tiles_for_raster.begin(), 117 return std::find(tiles_for_raster.begin(),
120 tiles_for_raster.end(), 118 tiles_for_raster.end(),
121 tile) != tiles_for_raster.end(); 119 tile) != tiles_for_raster.end();
122 } 120 }
123 121
124 void FakeTileManager::DidFinishRunningTasksForTesting() { 122 void FakeTileManager::DidFinishRunningTasksForTesting() {
125 DidFinishRunningTasks(); 123 DidFinishRunningTasks();
126 } 124 }
127 125
128 void FakeTileManager::Release(Tile* tile) { 126 void FakeTileManager::Release(Tile* tile) {
129 TileManager::Release(tile); 127 TileManager::Release(tile);
130 CleanUpReleasedTiles(); 128 CleanUpReleasedTiles();
131 } 129 }
132 130
133 } // namespace cc 131 } // namespace cc
OLDNEW
« cc/resources/tile_manager.cc ('K') | « cc/test/fake_tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698