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

Side by Side Diff: cc/tile_manager.h

Issue 11434033: Track the cost of impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TILE_MANAGER_H_ 5 #ifndef CC_TILE_MANAGER_H_
6 #define CC_TILE_MANAGER_H_ 6 #define CC_TILE_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "cc/resource_pool.h" 12 #include "cc/resource_pool.h"
13 #include "cc/tile_priority.h" 13 #include "cc/tile_priority.h"
14 14
15 namespace base { 15 namespace base {
16 class SequencedWorkerPool; 16 class SequencedWorkerPool;
17 } 17 }
18 18
19 namespace cc { 19 namespace cc {
20 20
21 class Tile; 21 class Tile;
22 class TileVersion; 22 class TileVersion;
23 class RenderingStats;
23 class ResourceProvider; 24 class ResourceProvider;
24 25
25 class CC_EXPORT TileManagerClient { 26 class CC_EXPORT TileManagerClient {
26 public: 27 public:
27 virtual void ScheduleManageTiles() = 0; 28 virtual void ScheduleManageTiles() = 0;
28 virtual void ScheduleRedraw() = 0; 29 virtual void ScheduleRedraw() = 0;
29 30
30 protected: 31 protected:
31 virtual ~TileManagerClient() {} 32 virtual ~TileManagerClient() {}
32 }; 33 };
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class CC_EXPORT TileManager { 68 class CC_EXPORT TileManager {
68 public: 69 public:
69 TileManager(TileManagerClient* client, ResourceProvider *resource_provider); 70 TileManager(TileManagerClient* client, ResourceProvider *resource_provider);
70 virtual ~TileManager(); 71 virtual ~TileManager();
71 72
72 const GlobalStateThatImpactsTilePriority& GlobalState() const { return global_ state_; } 73 const GlobalStateThatImpactsTilePriority& GlobalState() const { return global_ state_; }
73 void SetGlobalState(const GlobalStateThatImpactsTilePriority& state); 74 void SetGlobalState(const GlobalStateThatImpactsTilePriority& state);
74 75
75 void ManageTiles(); 76 void ManageTiles();
76 77
78 void renderingStats(RenderingStats*);
79
77 protected: 80 protected:
78 // Methods called by Tile 81 // Methods called by Tile
79 friend class Tile; 82 friend class Tile;
80 void RegisterTile(Tile*); 83 void RegisterTile(Tile*);
81 void UnregisterTile(Tile*); 84 void UnregisterTile(Tile*);
82 void WillModifyTilePriority(Tile*, WhichTree, const TilePriority& new_priority ); 85 void WillModifyTilePriority(Tile*, WhichTree, const TilePriority& new_priority );
83 86
84 private: 87 private:
85 void AssignGpuMemoryToTiles(); 88 void AssignGpuMemoryToTiles();
86 void FreeResourcesForTile(Tile*); 89 void FreeResourcesForTile(Tile*);
(...skipping 10 matching lines...) Expand all
97 scoped_ptr<ResourcePool> resource_pool_; 100 scoped_ptr<ResourcePool> resource_pool_;
98 bool manage_tiles_pending_; 101 bool manage_tiles_pending_;
99 int pending_raster_tasks_; 102 int pending_raster_tasks_;
100 scoped_refptr<base::SequencedWorkerPool> worker_pool_; 103 scoped_refptr<base::SequencedWorkerPool> worker_pool_;
101 104
102 GlobalStateThatImpactsTilePriority global_state_; 105 GlobalStateThatImpactsTilePriority global_state_;
103 106
104 typedef std::vector<Tile*> TileVector; 107 typedef std::vector<Tile*> TileVector;
105 TileVector tiles_; 108 TileVector tiles_;
106 TileVector tiles_that_need_to_be_rasterized_; 109 TileVector tiles_that_need_to_be_rasterized_;
110
nduca 2012/11/29 18:16:30 Here, you could consider just a RenderingStats obj
Tom Hudson 2012/11/29 20:30:31 Done.
111 double rasterize_time_in_seconds_;
107 }; 112 };
108 113
109 } // namespace cc 114 } // namespace cc
110 115
111 #endif // CC_TILE_MANAGER_H_ 116 #endif // CC_TILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698