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

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

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix raster-on-demand codepath Created 7 years, 3 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 #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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const std::vector<Tile*>& tiles, 80 const std::vector<Tile*>& tiles,
81 ResourceProvider* resource_provider) { 81 ResourceProvider* resource_provider) {
82 for (size_t i = 0; i < tiles.size(); ++i) { 82 for (size_t i = 0; i < tiles.size(); ++i) {
83 ManagedTileState& mts = tiles[i]->managed_state(); 83 ManagedTileState& mts = tiles[i]->managed_state();
84 ManagedTileState::TileVersion& tile_version = 84 ManagedTileState::TileVersion& tile_version =
85 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE]; 85 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE];
86 86
87 tile_version.resource_ = make_scoped_ptr( 87 tile_version.resource_ = make_scoped_ptr(
88 new ResourcePool::Resource(resource_provider, 88 new ResourcePool::Resource(resource_provider,
89 gfx::Size(1, 1), 89 gfx::Size(1, 1),
90 resource_provider->best_texture_format())); 90 resource_provider->best_texture_format(),
91 use_16_bit_tiles_));
91 92
92 bytes_releasable_ += tiles[i]->bytes_consumed_if_allocated(); 93 bytes_releasable_ += tiles[i]->bytes_consumed_if_allocated();
93 ++resources_releasable_; 94 ++resources_releasable_;
94 } 95 }
95 } 96 }
96 97
97 protected: 98 protected:
98 TileManager(TileManagerClient* client, 99 TileManager(TileManagerClient* client,
99 ResourceProvider* resource_provider, 100 ResourceProvider* resource_provider,
100 scoped_ptr<RasterWorkerPool> raster_worker_pool, 101 scoped_ptr<RasterWorkerPool> raster_worker_pool,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 171
171 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 172 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
172 173
173 bool did_initialize_visible_tile_; 174 bool did_initialize_visible_tile_;
174 175
175 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap; 176 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap;
176 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; 177 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
177 LayerPixelRefTaskMap image_decode_tasks_; 178 LayerPixelRefTaskMap image_decode_tasks_;
178 179
179 RasterTaskCompletionStats update_visible_tiles_stats_; 180 RasterTaskCompletionStats update_visible_tiles_stats_;
181 bool use_16_bit_tiles_;
180 182
181 DISALLOW_COPY_AND_ASSIGN(TileManager); 183 DISALLOW_COPY_AND_ASSIGN(TileManager);
182 }; 184 };
183 185
184 } // namespace cc 186 } // namespace cc
185 187
186 #endif // CC_RESOURCES_TILE_MANAGER_H_ 188 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698