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

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

Issue 69343005: Added preliminary support for tile rasterization with Ganesh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for tests that pass NULL resource_provider/context_provider. Created 7 years 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 private: 45 private:
46 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque; 46 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque;
47 TaskDeque completed_tasks_; 47 TaskDeque completed_tasks_;
48 }; 48 };
49 49
50 } // namespace 50 } // namespace
51 51
52 FakeTileManager::FakeTileManager(TileManagerClient* client) 52 FakeTileManager::FakeTileManager(TileManagerClient* client)
53 : TileManager(client, 53 : TileManager(client,
54 NULL, 54 NULL,
55 NULL,
55 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 56 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
56 1, 57 1,
57 std::numeric_limits<unsigned>::max(), 58 std::numeric_limits<unsigned>::max(),
58 NULL) {} 59 NULL) {}
59 60
60 FakeTileManager::FakeTileManager(TileManagerClient* client, 61 FakeTileManager::FakeTileManager(TileManagerClient* client,
61 ResourceProvider* resource_provider) 62 ResourceProvider* resource_provider)
62 : TileManager(client, 63 : TileManager(client,
63 resource_provider, 64 resource_provider,
65 NULL,
64 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 66 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
65 1, 67 1,
66 std::numeric_limits<unsigned>::max(), 68 std::numeric_limits<unsigned>::max(),
67 NULL) {} 69 NULL) {}
68 70
69 FakeTileManager::FakeTileManager(TileManagerClient* client, 71 FakeTileManager::FakeTileManager(TileManagerClient* client,
70 ResourceProvider* resource_provider, 72 ResourceProvider* resource_provider,
71 size_t raster_task_limit_bytes) 73 size_t raster_task_limit_bytes)
72 : TileManager(client, 74 : TileManager(client,
73 resource_provider, 75 resource_provider,
76 NULL,
74 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 77 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
75 1, 78 1,
76 raster_task_limit_bytes, 79 raster_task_limit_bytes,
77 NULL) {} 80 NULL) {}
78 81
79 FakeTileManager::~FakeTileManager() {} 82 FakeTileManager::~FakeTileManager() {}
80 83
81 void FakeTileManager::AssignMemoryToTiles( 84 void FakeTileManager::AssignMemoryToTiles(
82 const GlobalStateThatImpactsTilePriority& state) { 85 const GlobalStateThatImpactsTilePriority& state) {
83 tiles_for_raster.clear(); 86 tiles_for_raster.clear();
(...skipping 13 matching lines...) Expand all
97 void FakeTileManager::CheckForCompletedTasks() { 100 void FakeTileManager::CheckForCompletedTasks() {
98 RasterWorkerPoolForTesting()->CheckForCompletedTasks(); 101 RasterWorkerPoolForTesting()->CheckForCompletedTasks();
99 } 102 }
100 103
101 void FakeTileManager::Release(Tile* tile) { 104 void FakeTileManager::Release(Tile* tile) {
102 TileManager::Release(tile); 105 TileManager::Release(tile);
103 CleanUpReleasedTiles(); 106 CleanUpReleasedTiles();
104 } 107 }
105 108
106 } // namespace cc 109 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698