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

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

Issue 19308003: Merge 210713 "cc: Remove tile ref counting in tile manager." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: 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 | Annotate | Revision Log
« 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 22 matching lines...) Expand all
33 FakeTileManager::FakeTileManager(TileManagerClient* client, 33 FakeTileManager::FakeTileManager(TileManagerClient* client,
34 ResourceProvider* resource_provider) 34 ResourceProvider* resource_provider)
35 : TileManager(client, 35 : TileManager(client,
36 resource_provider, 36 resource_provider,
37 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool), 37 make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
38 1, 38 1,
39 false, 39 false,
40 NULL, 40 NULL,
41 resource_provider->best_texture_format()) {} 41 resource_provider->best_texture_format()) {}
42 42
43 FakeTileManager::~FakeTileManager() {}
44
43 void FakeTileManager::ReassignMemoryToOOMTilesRequiredForActivation() { 45 void FakeTileManager::ReassignMemoryToOOMTilesRequiredForActivation() {
44 ReassignGpuMemoryToOOMTilesRequiredForActivation(); 46 ReassignGpuMemoryToOOMTilesRequiredForActivation(
47 all_tiles, &tiles_for_raster, &oom_tiles_required_for_activation);
48 }
49
50 void FakeTileManager::AssignMemoryToTiles() {
51 tiles_for_raster.clear();
52 oom_tiles_required_for_activation.clear();
53 all_tiles.clear();
54
55 GetSortedTiles(&all_tiles);
56 AssignGpuMemoryToTiles(
57 all_tiles, &tiles_for_raster, &oom_tiles_required_for_activation);
45 } 58 }
46 59
47 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) { 60 bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) {
48 return std::find(tiles_that_need_to_be_rasterized().begin(), 61 return std::find(tiles_for_raster.begin(),
49 tiles_that_need_to_be_rasterized().end(), 62 tiles_for_raster.end(),
50 tile) != tiles_that_need_to_be_rasterized().end(); 63 tile) != tiles_for_raster.end();
51 } 64 }
52 65
53 } // namespace cc 66 } // 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