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

Side by Side Diff: cc/resources/tile_manager.h

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 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_RESOURCES_TILE_MANAGER_H_ 5 #ifndef CC_RESOURCES_TILE_MANAGER_H_
6 #define CC_RESOURCES_TILE_MANAGER_H_ 6 #define CC_RESOURCES_TILE_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "cc/base/ref_counted_managed.h" 17 #include "cc/base/ref_counted_managed.h"
18 #include "cc/base/unique_notifier.h" 18 #include "cc/base/unique_notifier.h"
19 #include "cc/debug/rendering_stats_instrumentation.h" 19 #include "cc/debug/rendering_stats_instrumentation.h"
20 #include "cc/resources/eviction_tile_priority_queue.h" 20 #include "cc/resources/eviction_tile_priority_queue.h"
21 #include "cc/resources/managed_tile_state.h" 21 #include "cc/resources/managed_tile_state.h"
22 #include "cc/resources/memory_history.h" 22 #include "cc/resources/memory_history.h"
23 #include "cc/resources/picture_pile_impl.h" 23 #include "cc/resources/picture_pile_impl.h"
24 #include "cc/resources/prioritized_tile_set.h" 24 #include "cc/resources/prioritized_tile_set.h"
25 #include "cc/resources/raster_tile_priority_queue.h" 25 #include "cc/resources/raster_tile_priority_queue.h"
26 #include "cc/resources/rasterizer.h" 26 #include "cc/resources/rasterizer.h"
27 #include "cc/resources/resource_pool.h" 27 #include "cc/resources/resource_pool.h"
28 #include "cc/resources/tile.h" 28 #include "cc/resources/tile.h"
29 29
30 namespace base {
31 namespace debug {
32 class TracedValue;
33 }
34 }
35
30 namespace cc { 36 namespace cc {
31 class PictureLayerImpl; 37 class PictureLayerImpl;
32 class ResourceProvider; 38 class ResourceProvider;
33 39
34 class CC_EXPORT TileManagerClient { 40 class CC_EXPORT TileManagerClient {
35 public: 41 public:
36 // Returns the set of layers that the tile manager should consider for raster. 42 // Returns the set of layers that the tile manager should consider for raster.
37 // TODO(vmpstr): Change the way we determine if we are ready to activate, so 43 // TODO(vmpstr): Change the way we determine if we are ready to activate, so
38 // that this can be removed. 44 // that this can be removed.
39 virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() const = 0; 45 virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() const = 0;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 101
96 scoped_refptr<Tile> CreateTile(PicturePileImpl* picture_pile, 102 scoped_refptr<Tile> CreateTile(PicturePileImpl* picture_pile,
97 const gfx::Size& tile_size, 103 const gfx::Size& tile_size,
98 const gfx::Rect& content_rect, 104 const gfx::Rect& content_rect,
99 const gfx::Rect& opaque_rect, 105 const gfx::Rect& opaque_rect,
100 float contents_scale, 106 float contents_scale,
101 int layer_id, 107 int layer_id,
102 int source_frame_number, 108 int source_frame_number,
103 int flags); 109 int flags);
104 110
105 scoped_ptr<base::Value> BasicStateAsValue() const; 111 scoped_refptr<base::debug::ConvertableToTraceFormat> BasicStateAsValue()
106 scoped_ptr<base::Value> AllTilesAsValue() const; 112 const;
113 void BasicStateAsValueInto(base::debug::TracedValue* dict) const;
114 void AllTilesAsValueInto(base::debug::TracedValue* array) const;
107 const MemoryHistory::Entry& memory_stats_from_last_assign() const { 115 const MemoryHistory::Entry& memory_stats_from_last_assign() const {
108 return memory_stats_from_last_assign_; 116 return memory_stats_from_last_assign_;
109 } 117 }
110 118
111 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) { 119 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) {
112 for (size_t i = 0; i < tiles.size(); ++i) { 120 for (size_t i = 0; i < tiles.size(); ++i) {
113 ManagedTileState& mts = tiles[i]->managed_state(); 121 ManagedTileState& mts = tiles[i]->managed_state();
114 ManagedTileState::TileVersion& tile_version = 122 ManagedTileState::TileVersion& tile_version =
115 mts.tile_versions[HIGH_QUALITY_RASTER_MODE]; 123 mts.tile_versions[HIGH_QUALITY_RASTER_MODE];
116 124
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; 257 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_;
250 258
251 UniqueNotifier ready_to_activate_check_notifier_; 259 UniqueNotifier ready_to_activate_check_notifier_;
252 260
253 DISALLOW_COPY_AND_ASSIGN(TileManager); 261 DISALLOW_COPY_AND_ASSIGN(TileManager);
254 }; 262 };
255 263
256 } // namespace cc 264 } // namespace cc
257 265
258 #endif // CC_RESOURCES_TILE_MANAGER_H_ 266 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« cc/base/math_util.h ('K') | « cc/resources/tile.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698