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

Unified Diff: cc/resources/tile_manager.h

Issue 246673005: cc: Start using raster/eviction iterators in tile manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 6c71152b2cda7c577d580d032ea1df9a0f9f3b6f..655c118efa6fbd056155cac8f19c7db808ddbf36 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -20,7 +20,6 @@
#include "cc/resources/managed_tile_state.h"
#include "cc/resources/memory_history.h"
#include "cc/resources/picture_pile_impl.h"
-#include "cc/resources/prioritized_tile_set.h"
#include "cc/resources/rasterizer.h"
#include "cc/resources/resource_pool.h"
#include "cc/resources/tile.h"
@@ -64,11 +63,15 @@ class CC_EXPORT TileManager : public RasterizerClient,
class CC_EXPORT RasterTileIterator {
public:
RasterTileIterator(TileManager* tile_manager, TreePriority tree_priority);
+ RasterTileIterator(const RasterTileIterator& other);
~RasterTileIterator();
RasterTileIterator& operator++();
operator bool() const;
Tile* operator*();
+ RasterTileIterator& operator=(const RasterTileIterator& other);
+
+ bool HasTilesRequiredForActivation() const;
private:
struct PairedPictureLayerIterator {
@@ -107,12 +110,14 @@ class CC_EXPORT TileManager : public RasterizerClient,
struct CC_EXPORT EvictionTileIterator {
public:
EvictionTileIterator();
+ EvictionTileIterator(const EvictionTileIterator& other);
EvictionTileIterator(TileManager* tile_manager, TreePriority tree_priority);
~EvictionTileIterator();
EvictionTileIterator& operator++();
operator bool() const;
Tile* operator*();
+ EvictionTileIterator& operator=(const EvictionTileIterator& other);
private:
struct PairedPictureLayerIterator {
@@ -216,7 +221,6 @@ class CC_EXPORT TileManager : public RasterizerClient,
// memory returns to soft limit after going over.
if (state != global_state_) {
global_state_ = state;
- prioritized_tiles_dirty_ = true;
resource_pool_->SetResourceUsageLimits(
global_state_.soft_memory_limit_in_bytes,
global_state_.unused_memory_limit_in_bytes,
@@ -254,9 +258,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
virtual void ScheduleTasks(
const TileVector& tiles_that_need_to_be_rasterized);
- void AssignGpuMemoryToTiles(PrioritizedTileSet* tiles,
- TileVector* tiles_that_need_to_be_rasterized);
- void GetTilesWithAssignedBins(PrioritizedTileSet* tiles);
+ void AssignGpuMemoryToTiles(TileVector* tiles_that_need_to_be_rasterized);
private:
enum RasterizerType {
@@ -286,7 +288,6 @@ class CC_EXPORT TileManager : public RasterizerClient,
SkPixelRef* pixel_ref);
scoped_refptr<RasterTask> CreateRasterTask(Tile* tile);
scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const;
- void UpdatePrioritizedTileSetIfNeeded();
TileManagerClient* client_;
ResourcePool* resource_pool_;
@@ -296,15 +297,9 @@ class CC_EXPORT TileManager : public RasterizerClient,
typedef base::hash_map<Tile::Id, Tile*> TileMap;
TileMap tiles_;
- PrioritizedTileSet prioritized_tiles_;
- bool prioritized_tiles_dirty_;
-
bool all_tiles_that_need_to_be_rasterized_have_memory_;
bool all_tiles_required_for_activation_have_memory_;
- size_t memory_required_bytes_;
- size_t memory_nice_to_have_bytes_;
-
size_t bytes_releasable_;
size_t resources_releasable_;
size_t max_raster_usage_bytes_;

Powered by Google App Engine
This is Rietveld 408576698