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

Unified Diff: cc/tile_manager.h

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.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..4a09350a4c1d45abda88502a614e830a176774aa
--- /dev/null
+++ b/cc/tile_manager.h
@@ -0,0 +1,47 @@
+// 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.
+
+#ifndef CC_TILE_MANAGER_H_
+#define CC_TILE_MANAGER_H_
+
+#include <vector>
+
+namespace cc {
+
+class Tile;
+class ResourceProvider;
+
+class TileManagerClient {
+ public:
+ virtual void ScheduleManage() = 0;
+
+ protected:
+ ~TileManagerClient() { }
+};
+
+// This class manages tiles, deciding which should get rasterized and which
+// should no longer have any memory assigned to them. Tile objects are "owned"
+// by layers; they automatically register with the manager when they are
+// created, and unregister from the manager when they are deleted.
+class TileManager {
+ public:
+ TileManager(TileManagerClient* client);
+ ~TileManager();
+ void Manage() { }
+
+ protected:
+ // Methods called by Tile
+ void RegisterTile(Tile*);
+ void UnregisterTile(Tile*);
+
+ private:
+ friend class Tile;
+
+ TileManagerClient* client_;
+ std::vector<Tile*> registered_tiles_;
+};
+
+}
+
+#endif
« no previous file with comments | « cc/tile.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698