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

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: 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 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "cc/resources/rasterizer.h" 10 #include "cc/resources/rasterizer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 g_fake_rasterizer.Pointer(), 86 g_fake_rasterizer.Pointer(),
87 g_fake_rasterizer.Pointer(), 87 g_fake_rasterizer.Pointer(),
88 allow_on_demand_raster, 88 allow_on_demand_raster,
89 NULL) {} 89 NULL) {}
90 90
91 FakeTileManager::~FakeTileManager() {} 91 FakeTileManager::~FakeTileManager() {}
92 92
93 void FakeTileManager::AssignMemoryToTiles( 93 void FakeTileManager::AssignMemoryToTiles(
94 const GlobalStateThatImpactsTilePriority& state) { 94 const GlobalStateThatImpactsTilePriority& state) {
95 tiles_for_raster.clear(); 95 tiles_for_raster.clear();
96 all_tiles.Clear();
97 96
98 SetGlobalStateForTesting(state); 97 SetGlobalStateForTesting(state);
99 GetTilesWithAssignedBins(&all_tiles); 98 AssignGpuMemoryToTiles(&tiles_for_raster);
100 AssignGpuMemoryToTiles(&all_tiles, &tiles_for_raster);
101 } 99 }
102 100
103 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { 101 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) {
104 return std::find(tiles_for_raster.begin(), 102 return std::find(tiles_for_raster.begin(),
105 tiles_for_raster.end(), 103 tiles_for_raster.end(),
106 tile) != tiles_for_raster.end(); 104 tile) != tiles_for_raster.end();
107 } 105 }
108 106
109 void FakeTileManager::DidFinishRunningTasksForTesting() { 107 void FakeTileManager::DidFinishRunningTasksForTesting() {
110 DidFinishRunningTasks(); 108 DidFinishRunningTasks();
111 } 109 }
112 110
113 void FakeTileManager::Release(Tile* tile) { 111 void FakeTileManager::Release(Tile* tile) {
114 TileManager::Release(tile); 112 TileManager::Release(tile);
115 CleanUpReleasedTiles(); 113 CleanUpReleasedTiles();
116 } 114 }
117 115
118 } // namespace cc 116 } // 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