| Index: cc/resources/picture_layer_tiling.h
|
| ===================================================================
|
| --- cc/resources/picture_layer_tiling.h (revision 243316)
|
| +++ cc/resources/picture_layer_tiling.h (working copy)
|
| @@ -15,7 +15,6 @@
|
| #include "cc/base/region.h"
|
| #include "cc/base/tiling_data.h"
|
| #include "cc/resources/tile.h"
|
| -#include "cc/resources/tile_bundle.h"
|
| #include "cc/resources/tile_priority.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| @@ -30,10 +29,6 @@
|
| virtual scoped_refptr<Tile> CreateTile(
|
| PictureLayerTiling* tiling,
|
| gfx::Rect content_rect) = 0;
|
| - virtual scoped_refptr<TileBundle> CreateTileBundle(int offset_x,
|
| - int offset_y,
|
| - int width,
|
| - int height) = 0;
|
| virtual void UpdatePile(Tile* tile) = 0;
|
| virtual gfx::Size CalculateTileSize(
|
| gfx::Size content_bounds) const = 0;
|
| @@ -71,51 +66,17 @@
|
| gfx::Size tile_size() const { return tiling_data_.max_texture_size(); }
|
| float contents_scale() const { return contents_scale_; }
|
|
|
| - Tile* TileAt(WhichTree tree, int, int) const;
|
| -
|
| - void SetTreeForTesting(WhichTree tree) {
|
| - current_tree_ = tree;
|
| - }
|
| void CreateAllTilesForTesting() {
|
| - current_tree_ = ACTIVE_TREE;
|
| SetLiveTilesRect(gfx::Rect(tiling_data_.total_size()));
|
| - live_tiles_rect_ = gfx::Rect();
|
| - current_tree_ = PENDING_TREE;
|
| - SetLiveTilesRect(gfx::Rect(tiling_data_.total_size()));
|
| }
|
| - void CreateTilesForTesting(WhichTree tree) {
|
| - current_tree_ = tree;
|
| - SetLiveTilesRect(gfx::Rect(tiling_data_.total_size()));
|
| - }
|
| +
|
| std::vector<Tile*> AllTilesForTesting() const {
|
| std::vector<Tile*> all_tiles;
|
| - for (TileBundleMap::const_iterator it = tile_bundles_.begin();
|
| - it != tile_bundles_.end(); ++it) {
|
| - for (TileBundle::Iterator tile_it(it->second.get()); tile_it; ++tile_it)
|
| - all_tiles.push_back(*tile_it);
|
| - }
|
| + for (TileMap::const_iterator it = tiles_.begin();
|
| + it != tiles_.end(); ++it)
|
| + all_tiles.push_back(it->second.get());
|
| return all_tiles;
|
| }
|
| - std::vector<TileBundle*> AllTileBundlesForTesting() const {
|
| - std::vector<TileBundle*> all_bundles;
|
| - for (TileBundleMap::const_iterator it = tile_bundles_.begin();
|
| - it != tile_bundles_.end(); ++it) {
|
| - all_bundles.push_back(it->second.get());
|
| - }
|
| - return all_bundles;
|
| - }
|
| - std::vector<Tile*> TilesForTesting(WhichTree tree) const {
|
| - std::vector<Tile*> all_tiles;
|
| - for (TileBundleMap::const_iterator it = tile_bundles_.begin();
|
| - it != tile_bundles_.end(); ++it) {
|
| - for (TileBundle::Iterator tile_it(it->second.get(), tree);
|
| - tile_it;
|
| - ++tile_it) {
|
| - all_tiles.push_back(*tile_it);
|
| - }
|
| - }
|
| - return all_tiles;
|
| - }
|
|
|
| Tile* TileAt(int i, int j) const;
|
|
|
| @@ -145,9 +106,6 @@
|
| Tile* operator->() const { return current_tile_; }
|
| Tile* operator*() const { return current_tile_; }
|
|
|
| - TilePriority priority();
|
| - void SetPriorityForTesting(const TilePriority& priority);
|
| -
|
| CoverageIterator& operator++();
|
| operator bool() const { return tile_j_ <= bottom_; }
|
|
|
| @@ -167,7 +125,6 @@
|
| int top_;
|
| int right_;
|
| int bottom_;
|
| - WhichTree tree_;
|
|
|
| friend class PictureLayerTiling;
|
| };
|
| @@ -232,28 +189,14 @@
|
| }
|
|
|
| protected:
|
| - friend class CoverageIterator;
|
| - friend class TileBundle;
|
| + typedef std::pair<int, int> TileMapKey;
|
| + typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
|
|
|
| - typedef std::pair<int, int> TileBundleMapKey;
|
| - typedef base::hash_map<TileBundleMapKey, scoped_refptr<TileBundle> >
|
| - TileBundleMap;
|
| -
|
| PictureLayerTiling(float contents_scale,
|
| gfx::Size layer_bounds,
|
| PictureLayerTilingClient* client);
|
| void SetLiveTilesRect(gfx::Rect live_tiles_rect);
|
| - void CreateTile(WhichTree tree,
|
| - int i,
|
| - int j,
|
| - const PictureLayerTiling* twin_tiling);
|
| - bool RemoveTile(WhichTree tree, int i, int j);
|
| - void RemoveBundleContainingTileAtIfEmpty(int i, int j);
|
| - TileBundle* TileBundleContainingTileAt(int, int) const;
|
| - TileBundle* CreateBundleForTileAt(int,
|
| - int,
|
| - const PictureLayerTiling* twin_tiling);
|
| - TileBundle* TileBundleAt(int, int) const;
|
| + void CreateTile(int i, int j, const PictureLayerTiling* twin_tiling);
|
|
|
| // Given properties.
|
| float contents_scale_;
|
| @@ -263,15 +206,14 @@
|
|
|
| // Internal data.
|
| TilingData tiling_data_;
|
| - TilingData bundle_tiling_data_;
|
| - // It is not legal to have a NULL tile bundle in the tile_bundles_ map.
|
| - TileBundleMap tile_bundles_;
|
| + TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map.
|
| gfx::Rect live_tiles_rect_;
|
| - WhichTree current_tree_;
|
|
|
| // State saved for computing velocities based upon finite differences.
|
| double last_impl_frame_time_in_seconds_;
|
|
|
| + friend class CoverageIterator;
|
| +
|
| private:
|
| DISALLOW_ASSIGN(PictureLayerTiling);
|
|
|
|
|