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

Unified Diff: cc/resources/picture_layer_tiling.h

Issue 1130123003: cc: Separate the priority from the tile and put in new PrioritizedTile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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
« no previous file with comments | « cc/resources/eviction_tile_priority_queue.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.h
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
index f63dc676c895e6aefce8acc0896b889b9c16c9fe..76723a348f1c873b346d1fb50aaea5791cc34d5d 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -29,6 +29,7 @@ class TracedValue;
namespace cc {
class PictureLayerTiling;
+class PrioritizedTile;
class RasterSource;
class CC_EXPORT PictureLayerTilingClient {
@@ -113,10 +114,14 @@ class CC_EXPORT PictureLayerTiling {
all_tiles.push_back(it->second);
return all_tiles;
}
- void UpdateAllTilePrioritiesForTesting() {
- for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
- UpdateTilePriority(it->second);
+
+ void UpdateAllRequiredStateForTesting() {
+ for (const auto& key_tile_pair : tiles_)
+ UpdateRequiredStatesOnTile(key_tile_pair.second);
}
+ std::map<const Tile*, PrioritizedTile>
+ UpdateAndGetAllPrioritizedTilesForTesting();
+
void SetAllTilesOccludedForTesting() {
gfx::Rect viewport_in_layer_space =
ScaleToEnclosingRect(current_visible_rect_, 1.0f / contents_scale_);
@@ -205,6 +210,7 @@ class CC_EXPORT PictureLayerTiling {
protected:
friend class CoverageIterator;
+ friend class PrioritizedTile;
friend class TilingSetRasterQueueAll;
friend class TilingSetRasterQueueRequired;
friend class TilingSetEvictionQueue;
@@ -268,7 +274,8 @@ class CC_EXPORT PictureLayerTiling {
bool IsTileOccludedOnCurrentTree(const Tile* tile) const;
bool ShouldCreateTileAt(int i, int j) const;
bool IsTileOccluded(const Tile* tile) const;
- void UpdateTilePriority(Tile* tile) const;
+ void UpdateRequiredStatesOnTile(Tile* tile) const;
+ PrioritizedTile MakePrioritizedTile(Tile* tile) const;
TilePriority ComputePriorityForTile(const Tile* tile) const;
bool has_visible_rect_tiles() const { return has_visible_rect_tiles_; }
bool has_skewport_rect_tiles() const { return has_skewport_rect_tiles_; }
« no previous file with comments | « cc/resources/eviction_tile_priority_queue.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698