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

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

Issue 12259027: cc: Simplify the logic for deciding to update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: in_seconds Created 7 years, 8 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/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.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_PICTURE_LAYER_TILING_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 WhichTree tree, 131 WhichTree tree,
132 gfx::Size device_viewport, 132 gfx::Size device_viewport,
133 const gfx::RectF& viewport_in_layer_space, 133 const gfx::RectF& viewport_in_layer_space,
134 const gfx::RectF& visible_layer_rect, 134 const gfx::RectF& visible_layer_rect,
135 gfx::Size last_layer_bounds, 135 gfx::Size last_layer_bounds,
136 gfx::Size current_layer_bounds, 136 gfx::Size current_layer_bounds,
137 float last_layer_contents_scale, 137 float last_layer_contents_scale,
138 float current_layer_contents_scale, 138 float current_layer_contents_scale,
139 const gfx::Transform& last_screen_transform, 139 const gfx::Transform& last_screen_transform,
140 const gfx::Transform& current_screen_transform, 140 const gfx::Transform& current_screen_transform,
141 int current_source_frame_number,
142 double current_frame_time, 141 double current_frame_time,
143 bool store_screen_space_quads_on_tiles, 142 bool store_screen_space_quads_on_tiles,
144 size_t max_tiles_for_interest_area); 143 size_t max_tiles_for_interest_area);
145 144
146 // Copies the src_tree priority into the dst_tree priority for all tiles. 145 // Copies the src_tree priority into the dst_tree priority for all tiles.
147 // The src_tree priority is reset to the lowest priority possible. This 146 // The src_tree priority is reset to the lowest priority possible. This
148 // also updates the pile on each tile to be the current client's pile. 147 // also updates the pile on each tile to be the current client's pile.
149 void DidBecomeActive(); 148 void DidBecomeActive();
150 149
151 scoped_ptr<base::Value> AsValue() const; 150 scoped_ptr<base::Value> AsValue() const;
152 151
152 bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) {
153 return frame_time_in_seconds != last_impl_frame_time_;
enne (OOO) 2013/04/22 19:44:17 last_impl_frame_time => last_frame_time_in_seconds
danakj 2013/04/22 19:47:59 Done.
154 }
155
153 protected: 156 protected:
154 typedef std::pair<int, int> TileMapKey; 157 typedef std::pair<int, int> TileMapKey;
155 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; 158 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
156 159
157 explicit PictureLayerTiling(float contents_scale); 160 explicit PictureLayerTiling(float contents_scale);
158 Tile* TileAt(int, int) const; 161 Tile* TileAt(int, int) const;
159 void CreateTilesFromContentRect(gfx::Rect layer_rect); 162 void CreateTilesFromContentRect(gfx::Rect layer_rect);
160 void CreateTile(int i, int j); 163 void CreateTile(int i, int j);
161 164
162 PictureLayerTilingClient* client_; 165 PictureLayerTilingClient* client_;
163 float contents_scale_; 166 float contents_scale_;
164 gfx::Size layer_bounds_; 167 gfx::Size layer_bounds_;
165 gfx::Rect last_prioritized_rect_; 168 gfx::Rect last_prioritized_rect_;
166 // It is not legal to have a NULL tile in the tiles_ map. 169 // It is not legal to have a NULL tile in the tiles_ map.
167 TileMap tiles_; 170 TileMap tiles_;
168 TilingData tiling_data_; 171 TilingData tiling_data_;
169 TileResolution resolution_; 172 TileResolution resolution_;
170 int last_source_frame_number_; 173 int last_source_frame_number_;
171 double last_impl_frame_time_; 174 double last_impl_frame_time_;
172 175
173 friend class CoverageIterator; 176 friend class CoverageIterator;
174 177
175 private: 178 private:
176 DISALLOW_ASSIGN(PictureLayerTiling); 179 DISALLOW_ASSIGN(PictureLayerTiling);
177 }; 180 };
178 181
179 } // namespace cc 182 } // namespace cc
180 183
181 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 184 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698