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

Unified Diff: cc/resources/tile.cc

Issue 38553002: cc: Add tile pool to tile manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/tile.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile.cc
diff --git a/cc/resources/tile.cc b/cc/resources/tile.cc
index 9e0a593d0434c0fc38dd3f75b17b9bf8ad14cc85..c3bf1e6c014c9a46d177d70ec55903481a979397 100644
--- a/cc/resources/tile.cc
+++ b/cc/resources/tile.cc
@@ -11,29 +11,12 @@
namespace cc {
-Tile::Id Tile::s_next_id_ = 0;
+Tile::Id Tile::s_next_id_ = 1;
-Tile::Tile(TileManager* tile_manager,
- PicturePileImpl* picture_pile,
- gfx::Size tile_size,
- gfx::Rect content_rect,
- gfx::Rect opaque_rect,
- float contents_scale,
- int layer_id,
- int source_frame_number,
- bool can_use_lcd_text)
+Tile::Tile(TileManager* tile_manager)
: RefCountedManaged<Tile>(tile_manager),
tile_manager_(tile_manager),
- tile_size_(tile_size),
- content_rect_(content_rect),
- contents_scale_(contents_scale),
- opaque_rect_(opaque_rect),
- layer_id_(layer_id),
- source_frame_number_(source_frame_number),
- can_use_lcd_text_(can_use_lcd_text),
- id_(s_next_id_++) {
- set_picture_pile(picture_pile);
-}
+ id_(0) {}
Tile::~Tile() {
TRACE_EVENT_OBJECT_DELETED_WITH_ID(
@@ -42,6 +25,25 @@ Tile::~Tile() {
"cc::Tile", this);
}
+void Tile::Reset(PicturePileImpl* picture_pile,
+ gfx::Size tile_size,
+ gfx::Rect content_rect,
+ gfx::Rect opaque_rect,
+ float contents_scale,
+ int layer_id,
+ int source_frame_number,
+ bool can_use_lcd_text) {
+ tile_size_ = tile_size;
+ content_rect_ = content_rect;
+ contents_scale_ = contents_scale;
+ opaque_rect_ = opaque_rect;
+ layer_id_ = layer_id;
+ source_frame_number_ = source_frame_number;
+ can_use_lcd_text_ = can_use_lcd_text;
+ set_picture_pile(picture_pile);
+ id_ = s_next_id_++;
+}
+
void Tile::SetPriority(WhichTree tree, const TilePriority& priority) {
if (priority == priority_[tree])
return;
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698