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

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

Issue 18581004: cc: Remove tile ref counting in tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ut compile fix Created 7 years, 5 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
« no previous file with comments | « 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 "cc/resources/raster_worker_pool.h" 7 #include "cc/resources/raster_worker_pool.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 FakeTileManager::FakeTileManager(TileManagerClient* client, 32 FakeTileManager::FakeTileManager(TileManagerClient* client,
33 ResourceProvider* resource_provider) 33 ResourceProvider* resource_provider)
34 : TileManager(client, 34 : TileManager(client,
35 resource_provider, 35 resource_provider,
36 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 36 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
37 1, 37 1,
38 NULL, 38 NULL,
39 resource_provider->best_texture_format()) {} 39 resource_provider->best_texture_format()) {}
40 40
41 FakeTileManager::~FakeTileManager() {}
42
41 void FakeTileManager::ReassignMemoryToOOMTilesRequiredForActivation() { 43 void FakeTileManager::ReassignMemoryToOOMTilesRequiredForActivation() {
42 ReassignGpuMemoryToOOMTilesRequiredForActivation(); 44 ReassignGpuMemoryToOOMTilesRequiredForActivation(
45 all_tiles, &tiles_for_raster, &oom_tiles_required_for_activation);
46 }
47
48 void FakeTileManager::AssignMemoryToTiles() {
49 tiles_for_raster.clear();
50 oom_tiles_required_for_activation.clear();
51 all_tiles.clear();
52
53 GetSortedTiles(&all_tiles);
54 AssignGpuMemoryToTiles(
55 all_tiles, &tiles_for_raster, &oom_tiles_required_for_activation);
43 } 56 }
44 57
45 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { 58 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) {
46 return std::find(tiles_that_need_to_be_rasterized().begin(), 59 return std::find(tiles_for_raster.begin(),
47 tiles_that_need_to_be_rasterized().end(), 60 tiles_for_raster.end(),
48 tile) != tiles_that_need_to_be_rasterized().end(); 61 tile) != tiles_for_raster.end();
49 } 62 }
50 63
51 } // namespace cc 64 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698