Commit 768c8ac2 authored by nduca@chromium.org's avatar nduca@chromium.org

Added a vector to TileManager to explicitly track live or allocated tiles.

The new vector should be exactly the elements that AssignGpuMemoryToTiles cares about.  In addition this patch fuses some loops (4 loops fused into 2).  I'm measuring about a 70% performance boost to ManageTiles on my linux machine.

BUG=174707

Review URL: https://codereview.chromium.org/12226046

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182105 0039d316-1c4b-4281-b951-d872f2087c98
parent 1ab6de81
......@@ -97,7 +97,7 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> {
float contents_scale_;
gfx::Rect opaque_rect_;
TilePriority priority_[2];
TilePriority priority_[NUM_BIN_PRIORITIES];
ManagedTileState managed_state_;
};
......
This diff is collapsed.
......@@ -166,9 +166,9 @@ class CC_EXPORT TileManager {
int manage_tiles_call_count_when_dispatched);
void DidFinishTileInitialization(Tile* tile);
void DidTileRasterStateChange(Tile* tile, TileRasterState state);
void DidTileBinChange(Tile* tile,
TileManagerBin bin,
WhichTree tree);
void DidTileTreeBinChange(Tile* tile,
TileManagerBin new_tree_bin,
WhichTree tree);
scoped_ptr<Value> GetMemoryRequirementsAsValue() const;
static void PerformRaster(uint8* buffer,
......@@ -192,7 +192,8 @@ class CC_EXPORT TileManager {
GlobalStateThatImpactsTilePriority global_state_;
typedef std::vector<Tile*> TileVector;
TileVector tiles_;
TileVector all_tiles_;
TileVector live_or_allocated_tiles_;
TileVector tiles_that_need_to_be_rasterized_;
typedef std::list<Tile*> TileList;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment