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

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: address review feedback Created 7 years, 1 month 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/resources/resource_provider_unittest.cc ('k') | cc/resources/tile_manager.cc » ('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 #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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class CC_EXPORT TileManager : public RasterWorkerPoolClient, 49 class CC_EXPORT TileManager : public RasterWorkerPoolClient,
50 public RefCountedManager<Tile> { 50 public RefCountedManager<Tile> {
51 public: 51 public:
52 static scoped_ptr<TileManager> Create( 52 static scoped_ptr<TileManager> Create(
53 TileManagerClient* client, 53 TileManagerClient* client,
54 ResourceProvider* resource_provider, 54 ResourceProvider* resource_provider,
55 size_t num_raster_threads, 55 size_t num_raster_threads,
56 RenderingStatsInstrumentation* rendering_stats_instrumentation, 56 RenderingStatsInstrumentation* rendering_stats_instrumentation,
57 bool use_map_image, 57 bool use_map_image,
58 size_t max_transfer_buffer_usage_bytes, 58 size_t max_transfer_buffer_usage_bytes,
59 size_t max_raster_usage_bytes); 59 size_t max_raster_usage_bytes,
60 GLenum map_image_texture_target);
60 virtual ~TileManager(); 61 virtual ~TileManager();
61 62
62 void ManageTiles(const GlobalStateThatImpactsTilePriority& state); 63 void ManageTiles(const GlobalStateThatImpactsTilePriority& state);
63 64
64 // Returns true when visible tiles have been initialized. 65 // Returns true when visible tiles have been initialized.
65 bool UpdateVisibleTiles(); 66 bool UpdateVisibleTiles();
66 67
67 scoped_refptr<Tile> CreateTile(PicturePileImpl* picture_pile, 68 scoped_refptr<Tile> CreateTile(PicturePileImpl* picture_pile,
68 gfx::Size tile_size, 69 gfx::Size tile_size,
69 gfx::Rect content_rect, 70 gfx::Rect content_rect,
(...skipping 16 matching lines...) Expand all
86 87
87 void InitializeTilesWithResourcesForTesting( 88 void InitializeTilesWithResourcesForTesting(
88 const std::vector<Tile*>& tiles, 89 const std::vector<Tile*>& tiles,
89 ResourceProvider* resource_provider) { 90 ResourceProvider* resource_provider) {
90 for (size_t i = 0; i < tiles.size(); ++i) { 91 for (size_t i = 0; i < tiles.size(); ++i) {
91 ManagedTileState& mts = tiles[i]->managed_state(); 92 ManagedTileState& mts = tiles[i]->managed_state();
92 ManagedTileState::TileVersion& tile_version = 93 ManagedTileState::TileVersion& tile_version =
93 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE]; 94 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE];
94 95
95 tile_version.resource_ = resource_pool_->AcquireResource( 96 tile_version.resource_ = resource_pool_->AcquireResource(
96 gfx::Size(1, 1), resource_provider->best_texture_format()); 97 gfx::Size(1, 1));
97 98
98 bytes_releasable_ += BytesConsumedIfAllocated(tiles[i]); 99 bytes_releasable_ += BytesConsumedIfAllocated(tiles[i]);
99 ++resources_releasable_; 100 ++resources_releasable_;
100 } 101 }
101 } 102 }
102 RasterWorkerPool* RasterWorkerPoolForTesting() { 103 RasterWorkerPool* RasterWorkerPoolForTesting() {
103 return raster_worker_pool_.get(); 104 return raster_worker_pool_.get();
104 } 105 }
105 106
106 void SetGlobalStateForTesting( 107 void SetGlobalStateForTesting(
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 RasterTaskCompletionStats update_visible_tiles_stats_; 217 RasterTaskCompletionStats update_visible_tiles_stats_;
217 218
218 std::vector<Tile*> released_tiles_; 219 std::vector<Tile*> released_tiles_;
219 220
220 DISALLOW_COPY_AND_ASSIGN(TileManager); 221 DISALLOW_COPY_AND_ASSIGN(TileManager);
221 }; 222 };
222 223
223 } // namespace cc 224 } // namespace cc
224 225
225 #endif // CC_RESOURCES_TILE_MANAGER_H_ 226 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698