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

Unified Diff: cc/tile_manager.cc

Issue 11369130: [cc] Tiles and tile manager for impl side painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixen Created 8 years, 1 month 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/tile_manager.h ('k') | cc/tile_priority.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.cc
diff --git a/cc/tile_manager.cc b/cc/tile_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..68f399c3bdc417ac0565336b7a22ee90acce2744
--- /dev/null
+++ b/cc/tile_manager.cc
@@ -0,0 +1,33 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/tile_manager.h"
+
+#include "base/logging.h"
+
+namespace cc {
+
+TileManager::TileManager(TileManagerClient* client) {
+}
+
+TileManager::~TileManager() {
+ DCHECK(registered_tiles_.size() == 0);
+}
+
+void TileManager::RegisterTile(Tile* tile) {
+ registered_tiles_.push_back(tile);
+}
+
+void TileManager::UnregisterTile(Tile* tile) {
+ // TODO(nduca): Known slow. Shrug. Fish need frying.
+ for (size_t i = 0; i < registered_tiles_.size(); i++) {
+ if (registered_tiles_[i] == tile) {
+ registered_tiles_.erase(registered_tiles_.begin() + i);
+ return;
+ }
+ }
+ DCHECK(false) << "Tile " << tile << " wasnt regitered.";
+}
+
+}
« no previous file with comments | « cc/tile_manager.h ('k') | cc/tile_priority.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698