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

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

Issue 287643004: Re-land: cc: Examine layers to determine if we're ready to activate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: init check_if_ready_to_activate_pending_ properly 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
« no previous file with comments | « cc/test/fake_tile_manager.h ('k') | cc/test/fake_tile_manager_client.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/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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private: 56 private:
57 RasterTask::Vector completed_tasks_; 57 RasterTask::Vector completed_tasks_;
58 }; 58 };
59 base::LazyInstance<FakeRasterizerImpl> g_fake_rasterizer = 59 base::LazyInstance<FakeRasterizerImpl> g_fake_rasterizer =
60 LAZY_INSTANCE_INITIALIZER; 60 LAZY_INSTANCE_INITIALIZER;
61 61
62 } // namespace 62 } // namespace
63 63
64 FakeTileManager::FakeTileManager(TileManagerClient* client) 64 FakeTileManager::FakeTileManager(TileManagerClient* client)
65 : TileManager(client, 65 : TileManager(client,
66 base::MessageLoopProxy::current(),
66 NULL, 67 NULL,
67 g_fake_rasterizer.Pointer(), 68 g_fake_rasterizer.Pointer(),
68 true,
69 NULL) {} 69 NULL) {}
70 70
71 FakeTileManager::FakeTileManager(TileManagerClient* client, 71 FakeTileManager::FakeTileManager(TileManagerClient* client,
72 ResourcePool* resource_pool) 72 ResourcePool* resource_pool)
73 : TileManager(client, 73 : TileManager(client,
74 base::MessageLoopProxy::current(),
74 resource_pool, 75 resource_pool,
75 g_fake_rasterizer.Pointer(), 76 g_fake_rasterizer.Pointer(),
76 true,
77 NULL) {}
78
79 FakeTileManager::FakeTileManager(TileManagerClient* client,
80 ResourcePool* resource_pool,
81 bool allow_on_demand_raster)
82 : TileManager(client,
83 resource_pool,
84 g_fake_rasterizer.Pointer(),
85 allow_on_demand_raster,
86 NULL) {} 77 NULL) {}
87 78
88 FakeTileManager::~FakeTileManager() {} 79 FakeTileManager::~FakeTileManager() {}
89 80
90 void FakeTileManager::AssignMemoryToTiles( 81 void FakeTileManager::AssignMemoryToTiles(
91 const GlobalStateThatImpactsTilePriority& state) { 82 const GlobalStateThatImpactsTilePriority& state) {
92 tiles_for_raster.clear(); 83 tiles_for_raster.clear();
93 all_tiles.Clear(); 84 all_tiles.Clear();
94 85
95 SetGlobalStateForTesting(state); 86 SetGlobalStateForTesting(state);
(...skipping 10 matching lines...) Expand all
106 void FakeTileManager::DidFinishRunningTasksForTesting() { 97 void FakeTileManager::DidFinishRunningTasksForTesting() {
107 DidFinishRunningTasks(); 98 DidFinishRunningTasks();
108 } 99 }
109 100
110 void FakeTileManager::Release(Tile* tile) { 101 void FakeTileManager::Release(Tile* tile) {
111 TileManager::Release(tile); 102 TileManager::Release(tile);
112 CleanUpReleasedTiles(); 103 CleanUpReleasedTiles();
113 } 104 }
114 105
115 } // namespace cc 106 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_tile_manager.h ('k') | cc/test/fake_tile_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698