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

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

Issue 15995033: cc: Low quality support for low res tiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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/resources/tile.h ('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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 private: 118 private:
119 // Data that is passed to raster tasks. 119 // Data that is passed to raster tasks.
120 struct RasterTaskMetadata { 120 struct RasterTaskMetadata {
121 scoped_ptr<base::Value> AsValue() const; 121 scoped_ptr<base::Value> AsValue() const;
122 bool is_tile_in_pending_tree_now_bin; 122 bool is_tile_in_pending_tree_now_bin;
123 TileResolution tile_resolution; 123 TileResolution tile_resolution;
124 int layer_id; 124 int layer_id;
125 const void* tile_id; 125 const void* tile_id;
126 int source_frame_number; 126 int source_frame_number;
127 unsigned raster_flags;
vmpstr 2013/06/03 23:34:22 This is here temporarily, until tasks become separ
127 }; 128 };
128 129
129 void AssignBinsToTiles(); 130 void AssignBinsToTiles();
130 void SortTiles(); 131 void SortTiles();
132 unsigned DetermineRasterFlags(const Tile* tile) const;
131 void AssignGpuMemoryToTiles(); 133 void AssignGpuMemoryToTiles();
132 void FreeResourcesForTile(Tile* tile); 134 void FreeResourcesForTile(Tile* tile);
133 void ScheduleManageTiles() { 135 void ScheduleManageTiles() {
134 if (manage_tiles_pending_) 136 if (manage_tiles_pending_)
135 return; 137 return;
136 client_->ScheduleManageTiles(); 138 client_->ScheduleManageTiles();
137 manage_tiles_pending_ = true; 139 manage_tiles_pending_ = true;
138 } 140 }
139 RasterWorkerPool::Task CreateImageDecodeTask( 141 RasterWorkerPool::Task CreateImageDecodeTask(
140 Tile* tile, skia::LazyPixelRef* pixel_ref); 142 Tile* tile, skia::LazyPixelRef* pixel_ref);
141 void OnImageDecodeTaskCompleted( 143 void OnImageDecodeTaskCompleted(
142 scoped_refptr<Tile> tile, 144 scoped_refptr<Tile> tile,
143 uint32_t pixel_ref_id); 145 uint32_t pixel_ref_id);
144 RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const; 146 RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const;
145 RasterWorkerPool::RasterTask CreateRasterTask(Tile* tile); 147 RasterWorkerPool::RasterTask CreateRasterTask(Tile* tile);
146 void OnRasterTaskCompleted( 148 void OnRasterTaskCompleted(
147 scoped_refptr<Tile> tile, 149 scoped_refptr<Tile> tile,
148 scoped_ptr<ResourcePool::Resource> resource, 150 scoped_ptr<ResourcePool::Resource> resource,
149 PicturePileImpl::Analysis* analysis, 151 PicturePileImpl::Analysis* analysis,
152 unsigned raster_flags,
150 bool was_canceled); 153 bool was_canceled);
151 void DidFinishTileInitialization(Tile* tile); 154 void DidFinishTileInitialization(Tile* tile);
152 void DidTileTreeBinChange(Tile* tile, 155 void DidTileTreeBinChange(Tile* tile,
153 TileManagerBin new_tree_bin, 156 TileManagerBin new_tree_bin,
154 WhichTree tree); 157 WhichTree tree);
155 scoped_ptr<Value> GetMemoryRequirementsAsValue() const; 158 scoped_ptr<Value> GetMemoryRequirementsAsValue() const;
156 void AddRequiredTileForActivation(Tile* tile); 159 void AddRequiredTileForActivation(Tile* tile);
157 160
158 static void RunImageDecodeTask( 161 static void RunImageDecodeTask(
159 skia::LazyPixelRef* pixel_ref, 162 skia::LazyPixelRef* pixel_ref,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 207
205 bool use_color_estimator_; 208 bool use_color_estimator_;
206 bool did_initialize_visible_tile_; 209 bool did_initialize_visible_tile_;
207 210
208 DISALLOW_COPY_AND_ASSIGN(TileManager); 211 DISALLOW_COPY_AND_ASSIGN(TileManager);
209 }; 212 };
210 213
211 } // namespace cc 214 } // namespace cc
212 215
213 #endif // CC_RESOURCES_TILE_MANAGER_H_ 216 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698