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

Side by Side Diff: cc/resources/tile_manager.h

Issue 83883002: cc: Allow TEXTURE_RECTANGLE_ARB to be used for tile textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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 #ifndef CC_RESOURCES_TILE_MANAGER_H_ 5 #ifndef CC_RESOURCES_TILE_MANAGER_H_
6 #define CC_RESOURCES_TILE_MANAGER_H_ 6 #define CC_RESOURCES_TILE_MANAGER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 void InitializeTilesWithResourcesForTesting( 87 void InitializeTilesWithResourcesForTesting(
88 const std::vector<Tile*>& tiles, 88 const std::vector<Tile*>& tiles,
89 ResourceProvider* resource_provider) { 89 ResourceProvider* resource_provider) {
90 for (size_t i = 0; i < tiles.size(); ++i) { 90 for (size_t i = 0; i < tiles.size(); ++i) {
91 ManagedTileState& mts = tiles[i]->managed_state(); 91 ManagedTileState& mts = tiles[i]->managed_state();
92 ManagedTileState::TileVersion& tile_version = 92 ManagedTileState::TileVersion& tile_version =
93 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE]; 93 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE];
94 94
95 tile_version.resource_ = resource_pool_->AcquireResource( 95 tile_version.resource_ = resource_pool_->AcquireResource(
96 gfx::Size(1, 1), resource_provider->best_texture_format()); 96 gfx::Size(1, 1));
97 97
98 bytes_releasable_ += BytesConsumedIfAllocated(tiles[i]); 98 bytes_releasable_ += BytesConsumedIfAllocated(tiles[i]);
99 ++resources_releasable_; 99 ++resources_releasable_;
100 } 100 }
101 } 101 }
102 RasterWorkerPool* RasterWorkerPoolForTesting() { 102 RasterWorkerPool* RasterWorkerPoolForTesting() {
103 return raster_worker_pool_.get(); 103 return raster_worker_pool_.get();
104 } 104 }
105 105
106 void SetGlobalStateForTesting( 106 void SetGlobalStateForTesting(
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 RasterTaskCompletionStats update_visible_tiles_stats_; 216 RasterTaskCompletionStats update_visible_tiles_stats_;
217 217
218 std::vector<Tile*> released_tiles_; 218 std::vector<Tile*> released_tiles_;
219 219
220 DISALLOW_COPY_AND_ASSIGN(TileManager); 220 DISALLOW_COPY_AND_ASSIGN(TileManager);
221 }; 221 };
222 222
223 } // namespace cc 223 } // namespace cc
224 224
225 #endif // CC_RESOURCES_TILE_MANAGER_H_ 225 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698