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

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

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_layer_tiling_perftest.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef CC_RESOURCES_TILE_H_
6 #define CC_RESOURCES_TILE_H_ 6 #define CC_RESOURCES_TILE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 size_t GPUMemoryUsageInBytes() const; 98 size_t GPUMemoryUsageInBytes() const;
99 99
100 RasterMode GetRasterModeForTesting() const { 100 RasterMode GetRasterModeForTesting() const {
101 return managed_state().raster_mode; 101 return managed_state().raster_mode;
102 } 102 }
103 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) { 103 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) {
104 return managed_state_.tile_versions[mode]; 104 return managed_state_.tile_versions[mode];
105 } 105 }
106 106
107 gfx::Size size() const { return tile_size_.size(); } 107 gfx::Size size() const { return tile_size_; }
108 108
109 private: 109 private:
110 friend class TileManager; 110 friend class TileManager;
111 friend class PrioritizedTileSet; 111 friend class PrioritizedTileSet;
112 friend class FakeTileManager; 112 friend class FakeTileManager;
113 friend class BinComparator; 113 friend class BinComparator;
114 114
115 // Methods called by by tile manager. 115 // Methods called by by tile manager.
116 Tile(TileManager* tile_manager, 116 explicit Tile(TileManager* tile_manager);
117 PicturePileImpl* picture_pile,
118 gfx::Size tile_size,
119 gfx::Rect content_rect,
120 gfx::Rect opaque_rect,
121 float contents_scale,
122 int layer_id,
123 int source_frame_number,
124 bool can_use_lcd_text);
125 ~Tile(); 117 ~Tile();
126 118
119 void Reset(PicturePileImpl* picture_pile,
120 gfx::Size tile_size,
121 gfx::Rect content_rect,
122 gfx::Rect opaque_rect,
123 float contents_scale,
124 int layer_id,
125 int source_frame_number,
126 bool can_use_lcd_text);
127
127 ManagedTileState& managed_state() { return managed_state_; } 128 ManagedTileState& managed_state() { return managed_state_; }
128 const ManagedTileState& managed_state() const { return managed_state_; } 129 const ManagedTileState& managed_state() const { return managed_state_; }
130 void reset_picture_pile() { picture_pile_ = NULL; }
129 131
130 TileManager* tile_manager_; 132 TileManager* tile_manager_;
131 scoped_refptr<PicturePileImpl> picture_pile_; 133 scoped_refptr<PicturePileImpl> picture_pile_;
132 gfx::Rect tile_size_; 134 gfx::Size tile_size_;
133 gfx::Rect content_rect_; 135 gfx::Rect content_rect_;
134 float contents_scale_; 136 float contents_scale_;
135 gfx::Rect opaque_rect_; 137 gfx::Rect opaque_rect_;
136 138
137 TilePriority priority_[NUM_TREES]; 139 TilePriority priority_[NUM_TREES];
138 ManagedTileState managed_state_; 140 ManagedTileState managed_state_;
139 int layer_id_; 141 int layer_id_;
140 int source_frame_number_; 142 int source_frame_number_;
141 bool can_use_lcd_text_; 143 bool can_use_lcd_text_;
142 144
143 Id id_; 145 Id id_;
144 static Id s_next_id_; 146 static Id s_next_id_;
145 147
146 DISALLOW_COPY_AND_ASSIGN(Tile); 148 DISALLOW_COPY_AND_ASSIGN(Tile);
147 }; 149 };
148 150
149 } // namespace cc 151 } // namespace cc
150 152
151 #endif // CC_RESOURCES_TILE_H_ 153 #endif // CC_RESOURCES_TILE_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_perftest.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698