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

Side by Side Diff: cc/tile_manager.h

Issue 12084031: A host of micro-optimizations and a refactor of TimeForBoundsToIntersect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
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_TILE_MANAGER_H_ 5 #ifndef CC_TILE_MANAGER_H_
6 #define CC_TILE_MANAGER_H_ 6 #define CC_TILE_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <queue> 9 #include <queue>
10 #include <vector> 10 #include <vector>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 size_t* memoryUsedBytes); 89 size_t* memoryUsedBytes);
90 90
91 void GetRenderingStats(RenderingStats* stats); 91 void GetRenderingStats(RenderingStats* stats);
92 92
93 protected: 93 protected:
94 // Methods called by Tile 94 // Methods called by Tile
95 friend class Tile; 95 friend class Tile;
96 void RegisterTile(Tile* tile); 96 void RegisterTile(Tile* tile);
97 void UnregisterTile(Tile* tile); 97 void UnregisterTile(Tile* tile);
98 void WillModifyTilePriority( 98 void WillModifyTilePriority(
99 Tile* tile, WhichTree tree, const TilePriority& new_priority); 99 Tile* tile, WhichTree tree, const TilePriority& new_priority) {
100 // TODO(nduca): Do something smarter if reprioritization turns out to be
101 // costly.
102 ScheduleManageTiles();
103 }
100 104
101 private: 105 private:
102 void SortTiles(); 106 void SortTiles();
103 void AssignGpuMemoryToTiles(); 107 void AssignGpuMemoryToTiles();
104 void FreeResourcesForTile(Tile* tile); 108 void FreeResourcesForTile(Tile* tile);
105 void ScheduleManageTiles(); 109 void ScheduleManageTiles() {
110 if (manage_tiles_pending_)
111 return;
112 client_->ScheduleManageTiles();
113 manage_tiles_pending_ = true;
114 }
106 void DispatchMoreTasks(); 115 void DispatchMoreTasks();
107 void GatherPixelRefsForTile(Tile* tile); 116 void GatherPixelRefsForTile(Tile* tile);
108 void DispatchImageDecodeTasksForTile(Tile* tile); 117 void DispatchImageDecodeTasksForTile(Tile* tile);
109 void DispatchOneImageDecodeTask( 118 void DispatchOneImageDecodeTask(
110 scoped_refptr<Tile> tile, skia::LazyPixelRef* pixel_ref); 119 scoped_refptr<Tile> tile, skia::LazyPixelRef* pixel_ref);
111 void OnImageDecodeTaskCompleted( 120 void OnImageDecodeTaskCompleted(
112 scoped_refptr<Tile> tile, uint32_t pixel_ref_id); 121 scoped_refptr<Tile> tile, uint32_t pixel_ref_id);
113 void DispatchOneRasterTask(scoped_refptr<Tile> tile); 122 void DispatchOneRasterTask(scoped_refptr<Tile> tile);
114 void OnRasterTaskCompleted( 123 void OnRasterTaskCompleted(
115 scoped_refptr<Tile> tile, 124 scoped_refptr<Tile> tile,
(...skipping 25 matching lines...) Expand all
141 TileQueue tiles_with_pending_set_pixels_; 150 TileQueue tiles_with_pending_set_pixels_;
142 151
143 RenderingStats rendering_stats_; 152 RenderingStats rendering_stats_;
144 153
145 DISALLOW_COPY_AND_ASSIGN(TileManager); 154 DISALLOW_COPY_AND_ASSIGN(TileManager);
146 }; 155 };
147 156
148 } // namespace cc 157 } // namespace cc
149 158
150 #endif // CC_TILE_MANAGER_H_ 159 #endif // CC_TILE_MANAGER_H_
OLDNEW
« cc/picture_layer_tiling.cc ('K') | « cc/tile.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698