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

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

Issue 157743007: cc: Prevent usage of rasterize on-demand with delegating renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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 "cc/resources/raster_worker_pool.h" 10 #include "cc/resources/raster_worker_pool.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 TaskDeque completed_tasks_; 66 TaskDeque completed_tasks_;
67 }; 67 };
68 68
69 } // namespace 69 } // namespace
70 70
71 FakeTileManager::FakeTileManager(TileManagerClient* client) 71 FakeTileManager::FakeTileManager(TileManagerClient* client)
72 : TileManager(client, 72 : TileManager(client,
73 NULL, 73 NULL,
74 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 74 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
75 std::numeric_limits<unsigned>::max(), 75 std::numeric_limits<unsigned>::max(),
76 NULL) {} 76 NULL,
77 true) {}
77 78
78 FakeTileManager::FakeTileManager(TileManagerClient* client, 79 FakeTileManager::FakeTileManager(TileManagerClient* client,
79 ResourceProvider* resource_provider) 80 ResourceProvider* resource_provider)
80 : TileManager(client, 81 : TileManager(client,
81 resource_provider, 82 resource_provider,
82 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 83 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
83 std::numeric_limits<unsigned>::max(), 84 std::numeric_limits<unsigned>::max(),
84 NULL) {} 85 NULL,
86 true) {}
85 87
86 FakeTileManager::FakeTileManager(TileManagerClient* client, 88 FakeTileManager::FakeTileManager(TileManagerClient* client,
87 ResourceProvider* resource_provider, 89 ResourceProvider* resource_provider,
88 size_t raster_task_limit_bytes) 90 size_t raster_task_limit_bytes)
89 : TileManager(client, 91 : TileManager(client,
90 resource_provider, 92 resource_provider,
91 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 93 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
92 raster_task_limit_bytes, 94 raster_task_limit_bytes,
93 NULL) {} 95 NULL,
96 true) {}
94 97
95 FakeTileManager::~FakeTileManager() { 98 FakeTileManager::~FakeTileManager() {
96 RasterWorkerPoolForTesting()->Shutdown(); 99 RasterWorkerPoolForTesting()->Shutdown();
97 RasterWorkerPoolForTesting()->CheckForCompletedTasks(); 100 RasterWorkerPoolForTesting()->CheckForCompletedTasks();
98 } 101 }
99 102
100 void FakeTileManager::AssignMemoryToTiles( 103 void FakeTileManager::AssignMemoryToTiles(
101 const GlobalStateThatImpactsTilePriority& state) { 104 const GlobalStateThatImpactsTilePriority& state) {
102 tiles_for_raster.clear(); 105 tiles_for_raster.clear();
103 all_tiles.Clear(); 106 all_tiles.Clear();
(...skipping 12 matching lines...) Expand all
116 void FakeTileManager::CheckForCompletedTasks() { 119 void FakeTileManager::CheckForCompletedTasks() {
117 RasterWorkerPoolForTesting()->CheckForCompletedTasks(); 120 RasterWorkerPoolForTesting()->CheckForCompletedTasks();
118 } 121 }
119 122
120 void FakeTileManager::Release(Tile* tile) { 123 void FakeTileManager::Release(Tile* tile) {
121 TileManager::Release(tile); 124 TileManager::Release(tile);
122 CleanUpReleasedTiles(); 125 CleanUpReleasedTiles();
123 } 126 }
124 127
125 } // namespace cc 128 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698