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

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

Issue 470753002: cc: Change Tile::tile_size_ from a Rect to a Size. (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
« no previous file with comments | « no previous file | 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) { 132 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) {
133 DCHECK(pile->CanRaster(contents_scale_, content_rect_)) 133 DCHECK(pile->CanRaster(contents_scale_, content_rect_))
134 << gfx::ScaleToEnclosingRect(content_rect_, 1.f / contents_scale_) 134 << gfx::ScaleToEnclosingRect(content_rect_, 1.f / contents_scale_)
135 .ToString(); 135 .ToString();
136 picture_pile_ = pile; 136 picture_pile_ = pile;
137 } 137 }
138 138
139 size_t GPUMemoryUsageInBytes() const; 139 size_t GPUMemoryUsageInBytes() const;
140 140
141 gfx::Size size() const { return tile_size_.size(); } 141 gfx::Size size() const { return size_; }
142 142
143 RasterMode DetermineRasterModeForTree(WhichTree tree) const; 143 RasterMode DetermineRasterModeForTree(WhichTree tree) const;
144 RasterMode DetermineOverallRasterMode() const; 144 RasterMode DetermineOverallRasterMode() const;
145 145
146 // Functionality used in tests. 146 // Functionality used in tests.
147 RasterMode GetRasterModeForTesting() const { 147 RasterMode GetRasterModeForTesting() const {
148 return managed_state().raster_mode; 148 return managed_state().raster_mode;
149 } 149 }
150 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) { 150 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) {
151 return managed_state_.tile_versions[mode]; 151 return managed_state_.tile_versions[mode];
(...skipping 19 matching lines...) Expand all
171 ~Tile(); 171 ~Tile();
172 172
173 ManagedTileState& managed_state() { return managed_state_; } 173 ManagedTileState& managed_state() { return managed_state_; }
174 const ManagedTileState& managed_state() const { return managed_state_; } 174 const ManagedTileState& managed_state() const { return managed_state_; }
175 RasterMode DetermineRasterModeForResolution(TileResolution resolution) const; 175 RasterMode DetermineRasterModeForResolution(TileResolution resolution) const;
176 176
177 bool HasRasterTask() const; 177 bool HasRasterTask() const;
178 178
179 TileManager* tile_manager_; 179 TileManager* tile_manager_;
180 scoped_refptr<PicturePileImpl> picture_pile_; 180 scoped_refptr<PicturePileImpl> picture_pile_;
181 gfx::Rect tile_size_; 181 gfx::Size size_;
182 gfx::Rect content_rect_; 182 gfx::Rect content_rect_;
183 float contents_scale_; 183 float contents_scale_;
184 gfx::Rect opaque_rect_; 184 gfx::Rect opaque_rect_;
185 bool is_occluded_[NUM_TREES]; 185 bool is_occluded_[NUM_TREES];
186 186
187 TilePriority priority_[NUM_TREES]; 187 TilePriority priority_[NUM_TREES];
188 ManagedTileState managed_state_; 188 ManagedTileState managed_state_;
189 int layer_id_; 189 int layer_id_;
190 int source_frame_number_; 190 int source_frame_number_;
191 int flags_; 191 int flags_;
192 192
193 Id id_; 193 Id id_;
194 static Id s_next_id_; 194 static Id s_next_id_;
195 195
196 DISALLOW_COPY_AND_ASSIGN(Tile); 196 DISALLOW_COPY_AND_ASSIGN(Tile);
197 }; 197 };
198 198
199 } // namespace cc 199 } // namespace cc
200 200
201 #endif // CC_RESOURCES_TILE_H_ 201 #endif // CC_RESOURCES_TILE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698