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

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

Issue 1063493002: cc: Remove all traces of synchronous GPU rasterization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 8 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 base::LazyInstance<FakeTileTaskRunnerImpl> g_fake_tile_task_runner = 61 base::LazyInstance<FakeTileTaskRunnerImpl> g_fake_tile_task_runner =
62 LAZY_INSTANCE_INITIALIZER; 62 LAZY_INSTANCE_INITIALIZER;
63 63
64 } // namespace 64 } // namespace
65 65
66 FakeTileManager::FakeTileManager(TileManagerClient* client) 66 FakeTileManager::FakeTileManager(TileManagerClient* client)
67 : TileManager(client, 67 : TileManager(client,
68 base::MessageLoopProxy::current(), 68 base::MessageLoopProxy::current(),
69 nullptr, 69 nullptr,
70 g_fake_tile_task_runner.Pointer(), 70 g_fake_tile_task_runner.Pointer(),
71 nullptr,
72 std::numeric_limits<size_t>::max()) { 71 std::numeric_limits<size_t>::max()) {
73 } 72 }
74 73
75 FakeTileManager::FakeTileManager(TileManagerClient* client, 74 FakeTileManager::FakeTileManager(TileManagerClient* client,
76 ResourcePool* resource_pool) 75 ResourcePool* resource_pool)
77 : TileManager(client, 76 : TileManager(client,
78 base::MessageLoopProxy::current(), 77 base::MessageLoopProxy::current(),
79 resource_pool, 78 resource_pool,
80 g_fake_tile_task_runner.Pointer(), 79 g_fake_tile_task_runner.Pointer(),
81 nullptr,
82 std::numeric_limits<size_t>::max()) { 80 std::numeric_limits<size_t>::max()) {
83 } 81 }
84 82
85 FakeTileManager::~FakeTileManager() {} 83 FakeTileManager::~FakeTileManager() {}
86 84
87 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { 85 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) {
88 return std::find(tiles_for_raster.begin(), 86 return std::find(tiles_for_raster.begin(),
89 tiles_for_raster.end(), 87 tiles_for_raster.end(),
90 tile) != tiles_for_raster.end(); 88 tile) != tiles_for_raster.end();
91 } 89 }
92 90
93 void FakeTileManager::Release(Tile* tile) { 91 void FakeTileManager::Release(Tile* tile) {
94 TileManager::Release(tile); 92 TileManager::Release(tile);
95 93
96 FreeResourcesForReleasedTiles(); 94 FreeResourcesForReleasedTiles();
97 CleanUpReleasedTiles(); 95 CleanUpReleasedTiles();
98 } 96 }
99 97
100 } // namespace cc 98 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_task_worker_pool_unittest.cc ('k') | cc/test/layer_tree_pixel_resource_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698