summaryrefslogtreecommitdiffstats
path: root/cc/resources/tile.h
diff options
context:
space:
mode:
authorvmpstr <vmpstr@chromium.org>2015-05-06 11:29:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 18:30:17 +0000
commit6d440ed4fc458fae27397b868acb4ab2866119b1 (patch)
tree678be64d3c269be11d9b5bb0de885f504d2c3e9e /cc/resources/tile.h
parent7486759b94d87eb987a89b4314939e80b8900307 (diff)
downloadchromium_src-6d440ed4fc458fae27397b868acb4ab2866119b1.zip
chromium_src-6d440ed4fc458fae27397b868acb4ab2866119b1.tar.gz
chromium_src-6d440ed4fc458fae27397b868acb4ab2866119b1.tar.bz2
cc: Remove Tile refcounting and RefCountedManaged.
This patch removes ref counting from cc::Tile and also removes RefCountedManaged, since tile was the only user. R=danakj, enne Review URL: https://codereview.chromium.org/1125673007 Cr-Commit-Position: refs/heads/master@{#328562}
Diffstat (limited to 'cc/resources/tile.h')
-rw-r--r--cc/resources/tile.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/cc/resources/tile.h b/cc/resources/tile.h
index 45c2b04..e9ba91c 100644
--- a/cc/resources/tile.h
+++ b/cc/resources/tile.h
@@ -6,7 +6,6 @@
#define CC_RESOURCES_TILE_H_
#include "base/memory/ref_counted.h"
-#include "cc/base/ref_counted_managed.h"
#include "cc/resources/raster_source.h"
#include "cc/resources/tile_draw_info.h"
#include "cc/resources/tile_priority.h"
@@ -17,8 +16,13 @@ namespace cc {
class TileManager;
-class CC_EXPORT Tile : public RefCountedManaged<Tile> {
+class CC_EXPORT Tile {
public:
+ class Deleter {
+ public:
+ void operator()(Tile* tile) const;
+ };
+
enum TileRasterFlags { USE_PICTURE_ANALYSIS = 1 << 0 };
typedef uint64 Id;
@@ -96,9 +100,7 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
private:
friend class TileManager;
- friend class PrioritizedTileSet;
friend class FakeTileManager;
- friend class BinComparator;
friend class FakePictureLayerImpl;
// Methods called by by tile manager.
@@ -114,6 +116,7 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
bool HasRasterTask() const { return !!raster_task_.get(); }
+ TileManager* tile_manager_;
scoped_refptr<RasterSource> raster_source_;
gfx::Size desired_texture_size_;
gfx::Rect content_rect_;
@@ -141,6 +144,8 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
DISALLOW_COPY_AND_ASSIGN(Tile);
};
+using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>;
+
} // namespace cc
#endif // CC_RESOURCES_TILE_H_